Merge "Fix: unable to delete instance when cinder is down"
This commit is contained in:
commit
d233772b0d
@ -2361,12 +2361,20 @@ class ComputeManager(manager.Manager):
|
||||
instance=instance)
|
||||
except (cinder_exception.EndpointNotFound,
|
||||
keystone_exception.EndpointNotFound) as exc:
|
||||
LOG.warning(_LW('Ignoring EndpointNotFound: %s'), exc,
|
||||
LOG.warning(_LW('Ignoring EndpointNotFound for '
|
||||
'volume %(volume_id)s: %(exc)s'),
|
||||
{'exc': exc, 'volume_id': bdm.volume_id},
|
||||
instance=instance)
|
||||
except cinder_exception.ClientException as exc:
|
||||
LOG.warning(_LW('Ignoring Unknown cinder exception: %s'), exc,
|
||||
LOG.warning(_LW('Ignoring unknown cinder exception for '
|
||||
'volume %(volume_id)s: %(exc)s'),
|
||||
{'exc': exc, 'volume_id': bdm.volume_id},
|
||||
instance=instance)
|
||||
except Exception as exc:
|
||||
LOG.warning(_LW('Ignoring unknown exception for '
|
||||
'volume %(volume_id)s: %(exc)s'),
|
||||
{'exc': exc, 'volume_id': bdm.volume_id},
|
||||
instance=instance)
|
||||
|
||||
if vol_bdms:
|
||||
LOG.info(_LI('Took %(time).2f seconds to detach %(num)s volumes '
|
||||
'for instance.'),
|
||||
|
@ -1138,6 +1138,10 @@ class ComputeManagerUnitTestCase(test.NoDBTestCase):
|
||||
exc = exception.DiskNotFound(location="not\\here")
|
||||
self._test_shutdown_instance_exception(exc)
|
||||
|
||||
def test_shutdown_instance_other_exception(self):
|
||||
exc = Exception('some other exception')
|
||||
self._test_shutdown_instance_exception(exc)
|
||||
|
||||
def _test_init_instance_retries_reboot(self, instance, reboot_type,
|
||||
return_power_state):
|
||||
instance.host = self.compute.host
|
||||
|
Loading…
x
Reference in New Issue
Block a user