summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gundlach <michael.gundlach@rackspace.com>2010-10-12 13:42:43 -0400
committerMichael Gundlach <michael.gundlach@rackspace.com>2010-10-12 13:42:43 -0400
commit32ea289d13a7ec9d273a57d2bf30484b80bfebec (patch)
treeb5da7b51db5ba45fbca8ef089f4fa72afc2b2fe3
parent3894e22d517447fb3d5e9c367ffd2e67162f4b0f (diff)
downloadnova-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.py2
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']