Bug 2068489 - THT parameter DnsServers is being overwritten by neutron inventory data
Summary: THT parameter DnsServers is being overwritten by neutron inventory data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
: ---
Assignee: Harald Jensås
QA Contact: Joe H. Rahme
URL:
Whiteboard:
: 2074815 (view as bug list)
Depends On:
Blocks: 2081120
TreeView+ depends on / blocked
 
Reported: 2022-03-25 13:44 UTC by James Parker
Modified: 2023-12-16 04:25 UTC (History)
15 users (show)

Fixed In Version: openstack-tripleo-heat-templates-14.3.1-0.20220617150351.66bbda8.el9ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2081120 (view as bug list)
Environment:
Last Closed: 2022-09-21 12:19:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 835247 0 None MERGED Deprecate DnsServers THT parameter 2022-06-09 07:17:08 UTC
OpenStack gerrit 835248 0 None NEW Remove DnsServers THT parameter 2022-06-09 07:17:09 UTC
OpenStack gerrit 844383 0 None MERGED Deprecate DnsServers THT parameter 2022-06-09 07:17:09 UTC
Red Hat Issue Tracker OSP-14285 0 None None None 2022-03-25 13:52:55 UTC
Red Hat Issue Tracker RHOSPDOC-933 0 None None None 2022-08-03 10:31:57 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:20:14 UTC

Description James Parker 2022-03-25 13:44:45 UTC
Description of problem:
The THT parameter DnsServers is being overwritten by neutron inventory data.  When the parameter is supplied it is correctly set in the deployments group_vars:

(undercloud) [stack@undercloud-0 ~]$ grep -R -A 1 ctlplane_dns_nameservers ~/overcloud-deploy/overcloud/config-download/overcloud/group_vars/
/home/stack/overcloud-deploy/overcloud/config-download/overcloud/group_vars/ComputeSriov:ctlplane_dns_nameservers:
/home/stack/overcloud-deploy/overcloud/config-download/overcloud/group_vars/ComputeSriov-- 10.0.0.1
--
/home/stack/overcloud-deploy/overcloud/config-download/overcloud/group_vars/Controller:ctlplane_dns_nameservers:
/home/stack/overcloud-deploy/overcloud/config-download/overcloud/group_vars/Controller-- 10.0.0.1

But the deployment uses the value generated by neutron data. If a value in undercloud.conf is not supplied it will result in nothing being configured in the respective role's resolv.conf.

(undercloud) [stack@undercloud-0 ~]$ grep -R ctlplane_dns_nameservers ~/overcloud-deploy/overcloud/config-download/overcloud/tripleo-ansible-inventory.yaml
    ctlplane_dns_nameservers: &id001 []
    ctlplane_dns_nameservers: *id001

Version-Release number of selected component (if applicable):
17

How reproducible:
100%

Steps to Reproduce:
1. Deploy environment using DnsServer THT parameter as mechanism for setting up DNS servers to use for deployment
2.
3.

Actual results:
Deployment will not configure a DNS Server and will fail overcloud deployment if any step requires communication with an external service that requires DNS resolution e.g. an NTP server.

Expected results:
Parameter should either be deprecated and Docs updated accordingly or deployment should honor the parameter.

Additional info:

Comment 1 Harald Jensås 2022-03-25 15:37:39 UTC
We have used the dns_nameservers from the subnets for a long time by default:
https://review.opendev.org/c/openstack/tripleo-heat-templates/+/579582

It has been possible to override with DnsServers in THT parameters, but ideally the 'DEFAULT/undercloud_nameservers' or '%SUBNET_SECTION%/dns_nameservers' options in undercloud.conf should be used to define the DNS servers.

Since network config is applied during node provisioning, prior to creating a heat stack we cannot use the DnsServers parameter in 17.


I have proposed two patches upstream to deprecate and remove the parameter.

https://review.opendev.org/835247 - Deprecate DnsServers THT parameter
https://review.opendev.org/835248 - Remove DnsServers THT parameter


We also need to document this in OSP17 docs.

Comment 2 Brendan Shephard 2022-04-13 09:57:10 UTC
*** Bug 2074815 has been marked as a duplicate of this bug. ***

Comment 3 Ricardo Diaz 2022-04-18 09:04:44 UTC
Configure '%SUBNET_SECTION%/dns_nameservers' option in undercloud.conf works for me:

...

[mysubnet-subnet]

...
# DNS nameservers for the Neutron-managed subnet for the Overcloud
# instances on this network. If no nameservers are defined for the
# subnet, the nameservers defined for undercloud_nameservers will be
# used. (list value)
dns_nameservers = <NAMESERVER_1>,<NAMESERVER_2>
...

As a result:

[user@compute-0 ~]$ cat /etc/resolv.conf
; Created by cloud-init on instance boot automatically, do not edit.
;
# Generated by NetworkManager
nameserver NAMESERVER_1
nameserver NAMESERVER_2

Comment 8 Yaniv Kaul 2022-06-02 09:10:57 UTC
This is an urgent/high BZ. One patch (upstream) is merged, the other (https://review.opendev.org/c/openstack/tripleo-heat-templates/+/835248/) did not have any (visible) activity for a while. What's the next step here?

TIA,
Y.

Comment 9 Harald Jensås 2022-06-02 09:55:25 UTC
(In reply to Yaniv Kaul from comment #8)
> This is an urgent/high BZ. One patch (upstream) is merged, the other
> (https://review.opendev.org/c/openstack/tripleo-heat-templates/+/835248/)
> did not have any (visible) activity for a while. What's the next step here?
> 

I think this being urgent is misleading. This bugzilla is tracking the THT change, which I don see as urgent.
It looks like consensus upstream is not to backport the second patch to Wallaby (OSP-17).

I have proposed the Wallaby backport for the patch deprecating the DnsServers THT parameter.

It is urgent that the documentation change (see comment #7) is completed.

@igallagh - https://issues.redhat.com/browse/RHOSPDOC-933 is the doc issue, reach out if you have questions. Thanks!

Comment 10 Harald Jensås 2022-06-21 20:35:08 UTC
Moving this to modified.
The change[1] to deprecate the option has been backported.
The change[2] to remove the option has negative feedback in upstream reviews as a backport candidate. I.e the option won't be removed before OSP18.

We have a documentation bug[3] filed to ensure the needful is documented.

[1] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/844383
[2] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/835248
[3] https://issues.redhat.com/browse/RHOSPDOC-933

Comment 19 errata-xmlrpc 2022-09-21 12:19:42 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 (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), 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-2022:6543

Comment 20 Red Hat Bugzilla 2023-12-16 04:25:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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