Description of problem: with https://review.opendev.org/#/c/660741/ the old DEFAULT/dhcp_domain setting was removed because it was moved to api/dhcp_domain. As seen in https://bugs.launchpad.net/tripleo/+bug/1832537 this resulted in the hostname not being set correct. Instead the default novalocal was used. The issue us that the enabled_apis in nova-api is not correct. enabled_apis [1] won't get set when nova_metadata_wsgi_enabled == true, which is the case in tripleo. But the enabled_apis list get also modified for this case, so we need to move setting the config outside the conditional at [3]. A workaround for now is https://review.opendev.org/#/c/664966/ . [1] https://github.com/openstack/puppet-nova/blob/master/manifests/api.pp#L401 [2] https://github.com/openstack/puppet-nova/blob/master/manifests/api.pp#L353 [3] https://github.com/openstack/puppet-nova/blob/master/manifests/api.pp#L379 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
While the nova::api has an issue with setting the enabled_apis, this is not the root cause for this issue. I was wrong there. In general we use the config_drive. The compute driver/ironic creates the config drive with the metadata and adds the instance information [1]. For this metadata added to the config drive the [api]dhcp_domain is used to get and add the hostname [2]. * [api]/dhcp_domain commented out (restart nova_compute) [root@overcloud-novacompute-0 ~]# hostname overcloud-novacompute-0.novalocal [root@overcloud-novacompute-0 ~]# mount /dev/vda1 /mnt mount: /dev/vda1 is write-protected, mounting read-only [root@overcloud-novacompute-0 ~]# cat /mnt/openstack/latest/meta_data.json | python -m json.tool { ... "hostname": "overcloud-novacompute-0.novalocal", ... * [api]/dhcp_domain= [root@overcloud-novacompute-0 ~]# mount /dev/vda1 /mnt/ [root@overcloud-novacompute-0 ~]# cat /mnt/openstack/latest/meta_data.json | python -m json.tool { ... "hostname": "overcloud-novacompute-0", ... On the undercloud the nova_compute container used for the ironic driver uses the same nova.conf /var/lib/config-data/puppet-generated/nova/etc/nova/nova.conf as the api service. For this nova.conf we don't use the nova::metadata class which would set the [api]dhcp_domain setting with the nova::metadata::dhcp_domain key we have in the template. In the puppet-tripleo nova/api.pp we include ::nova::network::neutron [3] which explains why we get the expected hostname domain when nova::network::neutron::dhcp_domain is set via the workaround patch. So we'd need to include ::nova::metadata also for the compute services. [1] https://github.com/openstack/nova/blob/master/nova/virt/configdrive.py#L71 [2] https://github.com/openstack/nova/blob/master/nova/api/metadata/base.py#L517 [3] https://github.com/openstack/puppet-tripleo/blob/master/manifests/profile/base/nova/api.pp#L128
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:0283