diff --git a/nova/compute/manager.py b/nova/compute/manager.py index dbb7226d90c..cdb6b1660f6 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -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( diff --git a/nova/tests/unit/compute/test_compute_mgr.py b/nova/tests/unit/compute/test_compute_mgr.py index 8c20c0c6e2d..2ea4a129036 100644 --- a/nova/tests/unit/compute/test_compute_mgr.py +++ b/nova/tests/unit/compute/test_compute_mgr.py @@ -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',