Skip to content

Commit

Permalink
Merge "Catch VolumeEncryptionNotSupported during spawn"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Dec 20, 2016
2 parents 734aecb + d679f9a commit 5eb3144
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nova/compute/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,8 @@ def _build_and_run_instance(self, context, instance, image, injected_files,
exception.ImageUnacceptable,
exception.InvalidDiskInfo,
exception.InvalidDiskFormat,
exception.SignatureVerificationError) as e:
exception.SignatureVerificationError,
exception.VolumeEncryptionNotSupported) as e:
self._notify_about_instance_usage(context, instance,
'create.error', fault=e)
compute_utils.notify_about_instance_action(
Expand Down
4 changes: 4 additions & 0 deletions nova/tests/unit/compute/test_compute_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4060,6 +4060,10 @@ def test_build_and_run_signature_verification_error(self):
self._test_build_and_run_spawn_exceptions(
exception.SignatureVerificationError(reason=""))

def test_build_and_run_volume_encryption_not_supported(self):
self._test_build_and_run_spawn_exceptions(
exception.VolumeEncryptionNotSupported(reason=""))

def _test_build_and_run_spawn_exceptions(self, exc):
with test.nested(
mock.patch.object(self.compute.driver, 'spawn',
Expand Down

0 comments on commit 5eb3144

Please sign in to comment.