summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/driver.py
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2013-01-17 20:42:27 +0000
committerRick Harris <rconradharris@gmail.com>2013-01-17 21:44:57 +0000
commitd35fccc579812faa5c8d1338744d24e59c426dd6 (patch)
tree9f544f909d59a24d7567e46daff31dc9976e6572 /nova/scheduler/driver.py
parent52fe25a5281a50a5e4c1ff093ce9ed966241a3d7 (diff)
downloadnova-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/scheduler/driver.py')
-rw-r--r--nova/scheduler/driver.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py
index d1ae1cd6e..09de10388 100644
--- a/nova/scheduler/driver.py
+++ b/nova/scheduler/driver.py
@@ -56,8 +56,6 @@ CONF.register_opts(scheduler_driver_opts)
def handle_schedule_error(context, ex, instance_uuid, request_spec):
if not isinstance(ex, exception.NoValidHost):
LOG.exception(_("Exception during scheduler.run_instance"))
- compute_utils.add_instance_fault_from_exc(context,
- instance_uuid, ex, sys.exc_info())
state = vm_states.ERROR.upper()
LOG.warning(_('Setting instance to %(state)s state.'),
locals(), instance_uuid=instance_uuid)
@@ -68,6 +66,8 @@ def handle_schedule_error(context, ex, instance_uuid, request_spec):
'task_state': None})
notifications.send_update(context, old_ref, new_ref,
service="scheduler")
+ compute_utils.add_instance_fault_from_exc(context,
+ new_ref, ex, sys.exc_info())
properties = request_spec.get('instance_properties', {})
payload = dict(request_spec=request_spec,