summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2011-09-26 18:39:22 +0000
committerGerrit Code Review <review@openstack.org>2011-09-26 18:39:22 +0000
commit89de26a42360ee06b7a4d143d8d04c9dc21e2791 (patch)
tree7d281cf3a8e6f0069b5a8412acd515e289ace40e /nova/api
parenta884e3a161462f9a357efd6075f6fabb4d2308e1 (diff)
parent6415999523d26f1680265e5ca438020b7d6542c6 (diff)
Merge "put fully qualified domain name in local-hostname"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
index 68d39042f..3c8cd513f 100644
--- a/nova/api/ec2/cloud.py
+++ b/nova/api/ec2/cloud.py
@@ -52,6 +52,7 @@ from nova.image import s3
FLAGS = flags.FLAGS
+flags.DECLARE('dhcp_domain', 'nova.network.manager')
flags.DECLARE('service_down_time', 'nova.scheduler.driver')
LOG = logging.getLogger("nova.api.cloud")
@@ -327,7 +328,7 @@ class CloudController(object):
instance_ref = db.instance_get(ctxt, instance_ref[0]['id'])
mpi = self._get_mpi_data(ctxt, instance_ref['project_id'])
- hostname = instance_ref['hostname']
+ hostname = "%s.%s" % (instance_ref['hostname'], FLAGS.dhcp_domain)
host = instance_ref['host']
availability_zone = self._get_availability_zone_by_host(ctxt, host)
floating_ip = db.instance_get_floating_address(ctxt,