diff options
author | Rick Harris <rconradharris@gmail.com> | 2013-01-17 20:42:27 +0000 |
---|---|---|
committer | Rick Harris <rconradharris@gmail.com> | 2013-01-17 21:44:57 +0000 |
commit | d35fccc579812faa5c8d1338744d24e59c426dd6 (patch) | |
tree | 9f544f909d59a24d7567e46daff31dc9976e6572 /nova/tests/scheduler/test_chance_scheduler.py | |
parent | 52fe25a5281a50a5e4c1ff093ce9ed966241a3d7 (diff) | |
download | nova-d35fccc579812faa5c8d1338744d24e59c426dd6.tar.gz nova-d35fccc579812faa5c8d1338744d24e59c426dd6.tar.xz nova-d35fccc579812faa5c8d1338744d24e59c426dd6.zip |
Add host to instance_faults table.
Instances can be rescheduled or migrated to different hosts; so, to make
troubleshooting easier, it's convenient to store the host in which the
failure occured with the instance fault record.
Change-Id: Ib2b9a5bab5d95739b730f0eab15884c2db33a782
Diffstat (limited to 'nova/tests/scheduler/test_chance_scheduler.py')
-rw-r--r-- | nova/tests/scheduler/test_chance_scheduler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/scheduler/test_chance_scheduler.py b/nova/tests/scheduler/test_chance_scheduler.py index 26cde055b..76fba900d 100644 --- a/nova/tests/scheduler/test_chance_scheduler.py +++ b/nova/tests/scheduler/test_chance_scheduler.py @@ -130,11 +130,11 @@ class ChanceSchedulerTestCase(test_scheduler.SchedulerTestCase): # instance 1 ctxt.elevated().AndReturn(ctxt_elevated) self.driver.hosts_up(ctxt_elevated, 'compute').AndReturn([]) - compute_utils.add_instance_fault_from_exc(ctxt, - uuid, mox.IsA(exception.NoValidHost), mox.IgnoreArg()) - db.instance_update_and_get_original(ctxt, uuid, + old_ref, new_ref = db.instance_update_and_get_original(ctxt, uuid, {'vm_state': vm_states.ERROR, 'task_state': None}).AndReturn(({}, {})) + compute_utils.add_instance_fault_from_exc(ctxt, + new_ref, mox.IsA(exception.NoValidHost), mox.IgnoreArg()) self.mox.ReplayAll() self.driver.schedule_run_instance( |