From 6415999523d26f1680265e5ca438020b7d6542c6 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 23 Sep 2011 16:44:44 -0400 Subject: put fully qualified domain name in local-hostname make metadata service return fully qualified domain name (fqdn) in the local-hostname field. (bug 854614) Also, move the dhcp_domain flag from being in nova.network.linux_net to be in the more common nova.network.manager. Since it is being used for something more generic, it shouldnt be stuck in linux_net. Change-Id: Ieab3cb1b7b0b78aff8df25bbc35b96924a8e7e60 --- nova/api/ec2/cloud.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/api') 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, -- cgit