From 21b7149c5a9f8a33b337eec44d4a8a9c716781e3 Mon Sep 17 00:00:00 2001 From: Kravchenko Pavel Date: Fri, 8 Mar 2013 16:13:30 +0200 Subject: Fix instance evacuate with shared storage Fixes instance evacuation problem when --on-shared-storage flag specified. The problem occurs as the password variable ends up being accessed before it is assigned. Also adds missing test case. Fixes bug 1152492 Change-Id: I461c0f7fcf8835028f7529a7860fb330d1759d68 --- nova/api/openstack/compute/contrib/evacuate.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova/api') diff --git a/nova/api/openstack/compute/contrib/evacuate.py b/nova/api/openstack/compute/contrib/evacuate.py index 7877fa1fd..275cec904 100644 --- a/nova/api/openstack/compute/contrib/evacuate.py +++ b/nova/api/openstack/compute/contrib/evacuate.py @@ -53,6 +53,7 @@ class Controller(wsgi.Controller): on_shared_storage = utils.bool_from_str( evacuate_body["onSharedStorage"]) + password = None if 'adminPass' in evacuate_body: # check that if requested to evacuate server on shared storage # password not specified -- cgit