if self.servicegroup_api.service_is_up(service): LOG.error(_LE('Instance compute service state on %s ' 'expected to be down, but it was up.'), inst_host)
raise exception.ComputeServiceInUse(host=inst_host)
Can be changed to
if self.servicegroup_api.service_is_up(service): LOG.error(_LE('Instance compute service state on %s ' 'expected to be down, but it was up.'), inst_host)
#raise exception.ComputeServiceInUse(host=inst_host)
if host.state is not 'power_off' or 'crashed' or 'error': raise exception.ComputeServiceInUse(host=inst_host)
The code
if self.servicegro up_api. service_ is_up(service) :
LOG. error(_ LE('Instance compute service state on %s '
'expected to be down, but it was up.'), inst_host) ComputeServiceI nUse(host= inst_host)
raise exception.
Can be changed to
if self.servicegro up_api. service_ is_up(service) :
LOG. error(_ LE('Instance compute service state on %s '
'expected to be down, but it was up.'), inst_host) ComputeServiceI nUse(host= inst_host)
raise exception. ComputeServiceI nUse(host= inst_host)
#raise exception.
if host.state is not 'power_off' or 'crashed' or 'error':