diff options
author | Brian Elliott <brian.elliott@rackspace.com> | 2012-11-20 20:34:11 +0000 |
---|---|---|
committer | Brian Elliott <brian.elliott@rackspace.com> | 2012-11-25 14:14:57 +0000 |
commit | 7b39ef953a7157ab657329fc02075056e2d8a93a (patch) | |
tree | d45e9ef3a331c1d45aa8b729ca1abaefa793ea97 /nova/scheduler/driver.py | |
parent | f3e892ed5e10d3cd8ba9585f0a4782ff496feca1 (diff) | |
download | nova-7b39ef953a7157ab657329fc02075056e2d8a93a.tar.gz nova-7b39ef953a7157ab657329fc02075056e2d8a93a.tar.xz nova-7b39ef953a7157ab657329fc02075056e2d8a93a.zip |
Cleanup compute multi-node assignment of node
Move assignment of the node field on the instance to the compute host
to be more consistent with how the host field is assigned and handled
by the resource tracker.
Change-Id: Id3086585a99350abbab387932e689825b33ab6b5
Diffstat (limited to 'nova/scheduler/driver.py')
-rw-r--r-- | nova/scheduler/driver.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index e7c51c477..54c467833 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -87,21 +87,12 @@ def handle_schedule_error(context, ex, instance_uuid, request_spec): def instance_update_db(context, instance_uuid): - '''Clear the host and set the scheduled_at field of an Instance. + '''Clear the host and node - set the scheduled_at field of an Instance. :returns: An Instance with the updated fields set properly. ''' now = timeutils.utcnow() - values = {'host': None, 'scheduled_at': now} - return db.instance_update(context, instance_uuid, values) - - -def db_instance_node_set(context, instance_uuid, node): - '''Set the node field of an Instance. - - :returns: An Instance with the updated fields set properly. - ''' - values = {'node': node} + values = {'host': None, 'node': None, 'scheduled_at': now} return db.instance_update(context, instance_uuid, values) |