From baf7e02f29600e79eacb6c0f747075afeb74fdd5 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Thu, 15 Dec 2011 14:16:42 -0800 Subject: Fix scheduler error handler Fixes bug 904971 Scheduler error handler was looking for instance_id when it may or may not exist. Added the proper code for it to determine whether the instance was actually created in the DB or not and how to find its ID. Note: there's some pretty nasty stuff in here, but unavoidable without larger changes. I'd like to hold off on these larger changes, because the problem should be solved with some of the scalability work coming. Tests included. Change-Id: Ief5fde8128437c9dc257af9c4d0c2950d0962ce5 --- nova/compute/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index 3b79e660d..e939de62c 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -310,7 +310,7 @@ class API(base.Base): context, instance_type, image, base_options, security_group, block_device_mapping) # Tells scheduler we created the instance already. - base_options['id'] = instance['id'] + base_options['uuid'] = instance['uuid'] rpc_method = rpc.cast else: # We need to wait for the scheduler to create the instance -- cgit