Bug 1723451 - [OSP16] api/dhcp_domain won't get set on the undercloud if nova::network::neutron::dhcp_domain isn't defined
Summary: [OSP16] api/dhcp_domain won't get set on the undercloud if nova::network::neu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-nova
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 16.0 (Train on RHEL 8.1)
Assignee: Martin Schuppert
QA Contact: Archit Modi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-24 14:31 UTC by Martin Schuppert
Modified: 2020-02-06 14:41 UTC (History)
9 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.3.1-0.20191022072831.698e7db.el8ost puppet-nova-15.4.1-0.20191014175323.e6628d6.el8ost puppet-tripleo-11.3.1-0.20191022051220.c97dbd1.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-06 14:40:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1832537 0 None None None 2019-06-24 14:31:46 UTC
OpenStack gerrit 665131 0 'None' MERGED Set DEFAULT/enabled_apis in nova::api 2021-01-19 11:29:56 UTC
OpenStack gerrit 668663 0 'None' MERGED Remove deprecated vendordata* params from api/metadata 2021-01-19 11:29:56 UTC
OpenStack gerrit 668666 0 'None' MERGED Remove deprecated metadata option from nova::api 2021-01-19 11:29:57 UTC
OpenStack gerrit 668949 0 'None' MERGED Include nova::metadata to compute profile 2021-01-19 11:30:37 UTC
OpenStack gerrit 669066 0 'None' MERGED Deprecate oslo::middleware related parameters in ::nova::metadata 2021-01-19 11:29:57 UTC
OpenStack gerrit 669208 0 'None' MERGED Set nova::keystone auth details hiera on compute 2021-01-19 11:29:57 UTC
OpenStack gerrit 669270 0 'None' MERGED Revert "Also set nova::network::neutron::dhcp_domain" 2021-01-19 11:29:58 UTC
Red Hat Product Errata RHEA-2020:0283 0 None None None 2020-02-06 14:41:43 UTC

Description Martin Schuppert 2019-06-24 14:31:47 UTC
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:

Comment 2 Martin Schuppert 2019-07-02 11:52:48 UTC
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

Comment 13 errata-xmlrpc 2020-02-06 14:40:58 UTC
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


Note You need to log in before you can comment on or make changes to this bug.