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
This commit is contained in:
@@ -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'])
|
||||
|
||||
|
Reference in New Issue
Block a user