diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 858961a5ed..a0c192ebbd 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2083,7 +2083,10 @@ class ComputeManager(manager.Manager): exception.InvalidDiskFormat, cursive_exception.SignatureVerificationError, exception.VolumeEncryptionNotSupported, - exception.InvalidInput) as e: + exception.InvalidInput, + # TODO(mriedem): We should be validating RequestedVRamTooHigh + # in the API during server create and rebuild. + exception.RequestedVRamTooHigh) as e: self._notify_about_instance_usage(context, instance, 'create.error', fault=e) compute_utils.notify_about_instance_create( diff --git a/nova/tests/unit/compute/test_compute_mgr.py b/nova/tests/unit/compute/test_compute_mgr.py index 1dbab19671..3162de2c35 100644 --- a/nova/tests/unit/compute/test_compute_mgr.py +++ b/nova/tests/unit/compute/test_compute_mgr.py @@ -5466,6 +5466,10 @@ class ComputeManagerBuildInstanceTestCase(test.NoDBTestCase): self._test_build_and_run_spawn_exceptions( exception.InvalidInput(reason="")) + def test_build_and_run_requested_vram_too_high(self): + self._test_build_and_run_spawn_exceptions( + exception.RequestedVRamTooHigh(req_vram=200, max_vram=100)) + def _test_build_and_run_spawn_exceptions(self, exc): with test.nested( mock.patch.object(self.compute.driver, 'spawn',