diff options
author | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-10-12 13:42:43 -0400 |
---|---|---|
committer | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-10-12 13:42:43 -0400 |
commit | 32ea289d13a7ec9d273a57d2bf30484b80bfebec (patch) | |
tree | b5da7b51db5ba45fbca8ef089f4fa72afc2b2fe3 | |
parent | 3894e22d517447fb3d5e9c367ffd2e67162f4b0f (diff) | |
download | nova-32ea289d13a7ec9d273a57d2bf30484b80bfebec.tar.gz nova-32ea289d13a7ec9d273a57d2bf30484b80bfebec.tar.xz nova-32ea289d13a7ec9d273a57d2bf30484b80bfebec.zip |
Now that the ec2 id is not the same as the name of the instance, don't compare internal_id [nee ec2_id] to instance names provided by the virtualization driver. Compare names directly instead.
-rw-r--r-- | nova/compute/manager.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 131fac406..99705d3a9 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -67,7 +67,7 @@ class ComputeManager(manager.Manager): def run_instance(self, context, instance_id, **_kwargs): """Launch a new instance with specified options.""" instance_ref = self.db.instance_get(context, instance_id) - if instance_ref['internal_id'] in self.driver.list_instances(): + if instance_ref['name'] in self.driver.list_instances(): raise exception.Error("Instance has already been created") logging.debug("instance %s: starting...", instance_id) project_id = instance_ref['project_id'] |