At least in this case, it looks like what I need is FLAGS.dhcp_domain which is set in nova/network/linux_net.py .
but my simple patch to nova/api/ec2/cloud.py: - hostname = instance_ref['hostname'] + hostname = "%s.%s" % (instance_ref['hostname'], FLAGS.dhcp_domain)
resulted in (nova.api.ec2.metadata): TRACE: Traceback (most recent call last): (nova.api.ec2.metadata): TRACE: File "/home/ubuntu/src/nova/nova/api/ec2/metadatarequesthandler.py", line 79, in __call__ (nova.api.ec2.metadata): TRACE: meta_data = self.cc.get_metadata(remote_address) (nova.api.ec2.metadata): TRACE: File "/home/ubuntu/src/nova/nova/api/ec2/cloud.py", line 329, in get_metadata (nova.api.ec2.metadata): TRACE: hostname = "%s.%s" % (instance_ref['hostname'], FLAGS.dhcp_domain) (nova.api.ec2.metadata): TRACE: File "/home/ubuntu/src/nova/nova/flags.py", line 144, in __getattr__ (nova.api.ec2.metadata): TRACE: val = gflags.FlagValues.__getattr__(self, name) (nova.api.ec2.metadata): TRACE: File "/usr/lib/python2.7/dist-packages/gflags.py", line 935, in __getattr__ (nova.api.ec2.metadata): TRACE: raise AttributeError(name) (nova.api.ec2.metadata): TRACE: AttributeError: dhcp_domain (nova.api.ec2.metadata): TRACE:
I not sure that 'dhcp_domain' is actually what we want, but we want something.
At least in this case, it looks like what I need is linux_net. py .
FLAGS.dhcp_domain
which is set in nova/network/
but my simple patch to nova/api/ ec2/cloud. py: ref['hostname' ] ref['hostname' ], FLAGS.dhcp_domain)
- hostname = instance_
+ hostname = "%s.%s" % (instance_
resulted in ec2.metadata) : TRACE: Traceback (most recent call last): ec2.metadata) : TRACE: File "/home/ ubuntu/ src/nova/ nova/api/ ec2/metadatareq uesthandler. py", line 79, in __call__ ec2.metadata) : TRACE: meta_data = self.cc. get_metadata( remote_ address) ec2.metadata) : TRACE: File "/home/ ubuntu/ src/nova/ nova/api/ ec2/cloud. py", line 329, in get_metadata ec2.metadata) : TRACE: hostname = "%s.%s" % (instance_ ref['hostname' ], FLAGS.dhcp_domain) ec2.metadata) : TRACE: File "/home/ ubuntu/ src/nova/ nova/flags. py", line 144, in __getattr__ ec2.metadata) : TRACE: val = gflags. FlagValues. __getattr_ _(self, name) ec2.metadata) : TRACE: File "/usr/lib/ python2. 7/dist- packages/ gflags. py", line 935, in __getattr__ ec2.metadata) : TRACE: raise AttributeError( name) ec2.metadata) : TRACE: AttributeError: dhcp_domain ec2.metadata) : TRACE:
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
(nova.api.
I not sure that 'dhcp_domain' is actually what we want, but we want something.