There are no THT parameters to define ns_records of /etc/designate/pools.yaml

Bug #1999134 reported by Yamato Tanaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
In Progress
Undecided
Yamato Tanaka

Bug Description

Description
===========

As the following RFC says, parent's NS record and child's NS record must be the same value.

https://www.ietf.org/rfc/rfc1034.txt
~~~
As the last installation step, the delegation NS RRs and glue RRs
necessary to make the delegation effective should be added to the parent
zone. The administrators of both zones should insure that the NS and
glue RRs which mark both sides of the cut are consistent and remain so.

6.1. C.ISI.EDU name server

C.ISI.EDU is a name server for the root, MIL, and EDU domains of the IN
class, and would have zones for these domains. The zone data for the
root domain might be:

    . IN SOA SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. (
                            870611 ;serial
                            1800 ;refresh every 30 min
                            300 ;retry every 5 min
                            604800 ;expire after a week
                            86400) ;minimum of a day
    EDU. 86400 NS SRI-NIC.ARPA. <====================================(*)parent's NS record
            86400 NS C.ISI.EDU. <====================================(*)parent's NS record

The master file for the EDU zone might be stated relative to the origin
EDU. The zone data for the EDU domain might be:

    EDU. IN SOA SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. (
                            870729 ;serial
                            1800 ;refresh every 30 minutes
                            300 ;retry every 5 minutes
                            604800 ;expire after a week
                            86400 ;minimum of a day
                            )
                    NS SRI-NIC.ARPA. <====================================(*)child's NS record
                    NS C.ISI.EDU. <====================================(*)child's NS record
~~~

In Designate, NS records comes from ns_records of pools.yaml.
The default value in TripleO is ns1.example.org., ns2.example.org. and ns3.example.org.
~~~
[root@overcloud-controller-0 ~]# grep ns_records /var/lib/config-data/puppet-generated/designate/etc/designate/pools.yaml -A 6
  ns_records:
    - hostname: ns1.example.org.
      priority: 1
    - hostname: ns2.example.org.
      priority: 2
    - hostname: ns3.example.org.
      priority: 3

(overcloud) [stack@undercloud ~]$ openstack recordset list zone0.designate.example.com. --fit
+-------------------------------------+------------------------------------+------+-------------------------------------+--------+--------+
| id | name | type | records | status | action |
+-------------------------------------+------------------------------------+------+-------------------------------------+--------+--------+
| 94fd335c-cf11-43dc-87e8-ba4ea8dda38 | zone0.designate.example.com. | NS | ns3.example.org. | ACTIVE | NONE | <===(*)
| 4 | | | ns1.example.org. | | | <===(*)
| | | | ns2.example.org. | | | <===(*)
| ed6d2eaf-1453-4d1f-89bd- | zone0.designate.example.com. | SOA | ns2.example.org. | ACTIVE | NONE | <===(*)
| cc898e975a47 | | | test.example.com. 1670322189 | | |
| | | | 3545 600 86400 3600 | | |
| 2ccc3643-0ad3-4ddc-8fe4-87c7d5e3d35 | test.zone0.designate.example.com. | A | 10.0.0.100 | ACTIVE | NONE |
| e | | | | | |
| 5f15cbd8-3486-4936-9146-b2e9dc54c23 | test2.zone0.designate.example.com. | A | 10.0.0.101 | ACTIVE | NONE |
| c | | | | | |
+-------------------------------------+------------------------------------+------+-------------------------------------+--------+--------+
~~~

Therefore, ns_records of pools.yaml is really important parameter when we want to integrate Designate and the internet.
If wen cannot change ns_records of pools.yaml, we cannot integrate Designate and the internet.
We should be able to change ns_records of pools.yaml.

However, it seems that there is no THT value to configure ns_records.

  tripleo-ansible : https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/roles/designate_bind_pool/templates/pools.yaml.j2#L12-L16
  tripleo-heat-template : https://github.com/openstack/tripleo-heat-templates/blob/master/deployment/designate/designate-central-container-puppet.yaml#L231-L239

We should have THT parameter to define ns_records of /etc/designate/pools.yaml

Steps to reproduce
==================
1. deploy overcloud with Designate and BIND9
2. Create a zone
3. NS records and SOA record of the zone shows "nsX.example.org." which is the default value of ns_records of pools.yaml

Expected result
===============
We can change ns_records of /etc/designate/pools.yaml by THT.

Actual result
=============
We cannot change ns_records of /etc/designate/pools.yaml by THT.
The default value is the following.
~~~
[root@overcloud-controller-2 ~]# cat /var/lib/config-data/puppet-generated/designate/etc/designate/pools.yaml |grep ns_records -A 6
  ns_records:
    - hostname: ns1.example.org.
      priority: 1
    - hostname: ns2.example.org.
      priority: 2
    - hostname: ns3.example.org.
      priority: 3
~~~

Environment
===========
I saw this issue an Wallaby based environment (RHOSP 17.0)
But there should be the same issue in Master and Zed as well.

Logs & Configs
==============

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)
Changed in tripleo:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)
Changed in tripleo:
assignee: nobody → Yamato Tanaka (yatanaka-1007)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/883470

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/883471

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (master)

Change abandoned by "Yamato Tanaka <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/866980
Reason: master branch has been deprecated

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ansible (master)

Change abandoned by "Yamato Tanaka <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/866978
Reason: master branch has been deprecated

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/883470
Committed: https://opendev.org/openstack/tripleo-ansible/commit/73ccd0a8ab25156192f46dcd4791bcbb01ec2db5
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 73ccd0a8ab25156192f46dcd4791bcbb01ec2db5
Author: Yamato Tanaka <email address hidden>
Date: Thu Dec 8 19:40:29 2022 +0900

    fix to be able to edit ns_records of /etc/designate/pools.yaml

    As the RFC 1034 mentions, parent's NS records and child's NS records
    must be the same.
    For example:

      Parent:
        parent.example.com. SOA ......
        child NS nameserver1.child.parent.example.com.
        child NS nameserver2.child.parent.example.com.
        child NS nameserver3.child.parent.example.com.

      Child:
        child.parent.example.com. SOA ......
              NS nameserver1.child.parent.example.com.
              NS nameserver2.child.parent.example.com.
              NS nameserver3.child.parent.example.com.

    Currently, ns_records of /etc/designate/pools.yaml always start with
    nsX and are not changeable. To make them the same as parent's NS
    records, we have to be able to change ns_records to any value.

    As ns_records should end with ".", this change makes sure that it ends
    with ".".

    Partial-Bug: 1999134
    Change-Id: Id4466cfb01cf69dca06c56f4cd03146d8e38d363

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/883471
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/1a1e69e373a8d0af1d070f3ea3fdd9c50ef41e4d
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 1a1e69e373a8d0af1d070f3ea3fdd9c50ef41e4d
Author: Yamato Tanaka <email address hidden>
Date: Thu Dec 8 20:04:58 2022 +0900

    add parameter to change ns_records of /etc/designate/pools.yaml

    As the RFC 1034 mentions, parent's NS records and child's NS records
    must be the same.
    For example:

      Parent:
        parent.example.com. SOA ......
        child NS nameserver1.child.parent.example.com.
        child NS nameserver2.child.parent.example.com.
        child NS nameserver3.child.parent.example.com.

      Child:
        child.parent.example.com. SOA ......
              NS nameserver1.child.parent.example.com.
              NS nameserver2.child.parent.example.com.
              NS nameserver3.child.parent.example.com.

    Currently, there are no parameters to edit ns_records of
    /etc/designate/pools.yaml. To make them the same as parent's NS
    records, we have to have a parameter to configure ns_records.

    Partial-Bug: 1999134
    Depends-On: Id4466cfb01cf69dca06c56f4cd03146d8e38d363
    Change-Id: I97c4f7c4785dba4ea5485ccc8d4a6d0531e0d791

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.