summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/driver.py
diff options
context:
space:
mode:
authorBrian Elliott <brian.elliott@rackspace.com>2012-11-20 20:34:11 +0000
committerBrian Elliott <brian.elliott@rackspace.com>2012-11-25 14:14:57 +0000
commit7b39ef953a7157ab657329fc02075056e2d8a93a (patch)
treed45e9ef3a331c1d45aa8b729ca1abaefa793ea97 /nova/scheduler/driver.py
parentf3e892ed5e10d3cd8ba9585f0a4782ff496feca1 (diff)
downloadnova-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.py13
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)