From 3319c4d0d1d6566c84cc1428e0de54efa1be379e Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Wed, 8 Feb 2012 22:03:17 +0000 Subject: [PATCH] Consistently update instance in nova/compute/manager.py The code used a mix of self.db.instance_update and self._update_instance, so settle on self._update_instance. Also, the code used a mix of self._update_instance and self._set_instance_error_state, so settle on self._set_instance_error_state. This also changes the code to not clear task_state in all cases, leaving it set for debugging purposes. Change-Id: I5c841ebfb60ba4acf62382060e416ea780bd66ba --- nova/tests/test_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index 221f86fe..33861000 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -590,7 +590,7 @@ class ComputeTestCase(BaseTestCase): inst_ref = db.instance_get_by_uuid(self.context, instance_uuid) self.assertEqual(inst_ref['vm_state'], vm_states.ERROR) - self.assertEqual(inst_ref['task_state'], None) + self.assertEqual(inst_ref['task_state'], task_states.UPDATING_PASSWORD) self.compute.terminate_instance(self.context, inst_ref['uuid'])