From 5ada427935a0664f6c2534163f9988fb85d7b6ca Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 10 Apr 2013 01:05:42 +0000 Subject: Prevent rescuing a VM with a partially mounted volume. If a VM goes into rescue mode with a partially mounted volume, the volume won't re-appear after the VM is unrescued. Fix bug 1158942 Change-Id: I1e104236c41c59e67a0f0e9ef26143c57f6e0094 --- nova/api/openstack/compute/contrib/rescue.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/contrib/rescue.py b/nova/api/openstack/compute/contrib/rescue.py index 143b59063..c89d11117 100644 --- a/nova/api/openstack/compute/contrib/rescue.py +++ b/nova/api/openstack/compute/contrib/rescue.py @@ -60,6 +60,8 @@ class RescueController(wsgi.Controller): except exception.InstanceInvalidState as state_error: common.raise_http_conflict_for_instance_invalid_state(state_error, 'rescue') + except exception.InvalidVolume as volume_error: + raise exc.HTTPConflict(explanation=volume_error.format_message()) except exception.InstanceNotRescuable as non_rescuable: raise exc.HTTPBadRequest( explanation=non_rescuable.format_message()) -- cgit