NS records for sub-domains are removed during Zone import

Bug #1747016 reported by Dmitry Galkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Undecided
Dmitry Galkin

Bug Description

Hi all,

As of now, Designate removes all NS and SOA records when Zone is being imported.
For sub-domains this however means that we have to recreate the records manually after import.

For example - we do import:

curl -vv -g -i -X POST http://172.29.236.100:9001/v2/zones/tasks/imports -H "Content-Type: text/dns" -H "Accept: application/json" -H "X-Auth-Token: $TOKEN" -d '$ORIGIN openstacknew2.tech.
$TTL 600

openstacknew2.tech. IN NS ns5-1.example.tech.
subdomain.openstacknew2.tech. IN NS ns6-1.example.tech.
openstacknew2.tech. IN SOA ns5-1.example.tech. test.gmail.com. 1511534761 3542 600 86400 3600
test.openstacknew2.tech. 1200 IN A 192.168.74.10
test2.openstacknew2.tech. 2400 IN A 192.168.74.11
'

and than we can see that subdomain.openstacknew2.tech. NS record is missing:

[root@aio1-utility-container-10fda1d7 ~]# openstack recordset list 92bf95fa-55e9-4224-8d55-c1e3999bffd6
+--------------------------------------+--------------------------------+------+-----------------------------------------------------------------------------+--------+--------+
| id | name | type | records | status | action |
+--------------------------------------+--------------------------------+------+-----------------------------------------------------------------------------+--------+--------+
| 521ab7c4-4a85-45d2-84bc-1f10db67f65d | openstacknew2.tech. | NS | ns1-1.example.tech. | ACTIVE | NONE |
| 5a39b0d7-6b6b-4619-8d43-e7ddaa315114 | openstacknew2.tech. | SOA | ns1-1.example.tech. test.gmail.com. 1511534761 3594 600 86400 3600 | ACTIVE | NONE |
| bf8e1998-a8e0-4be9-af99-8b2f57e5f7fe | test2.openstacknew2.tech. | A | 192.168.74.11 | ACTIVE | NONE |
| d94e6cd1-4a53-4b2d-9623-f34eaefbd00a | test.openstacknew2.tech. | A | 192.168.74.10 | ACTIVE | NONE |
+--------------------------------------+--------------------------------+------+-----------------------------------------------------------------------------+--------+--------+

I have a small patch so that "subdomain.*" NS records will be kept. Ping me if you'd like it to be committed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/546702

Changed in designate:
assignee: nobody → Dmitry Galkin (galkindmitrii)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/546704

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/546702
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=f84aeaeefe8bad73fcbc718b06c0c63357856fac
Submitter: Zuul
Branch: master

commit f84aeaeefe8bad73fcbc718b06c0c63357856fac
Author: Dmitry Galkin <email address hidden>
Date: Wed Feb 21 17:06:50 2018 +0000

    Keep NS records for subdomains during Zone import.

    Change-Id: I07829822b8a50b0bff0b28370d9d6d3faacd445c
    Closes-Bug: 1747016

Changed in designate:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/queens)

Reviewed: https://review.openstack.org/546704
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=159e95f9375d15ce3318bb09a36bd95b44e82c08
Submitter: Zuul
Branch: stable/queens

commit 159e95f9375d15ce3318bb09a36bd95b44e82c08
Author: Dmitry Galkin <email address hidden>
Date: Wed Feb 21 17:06:50 2018 +0000

    Keep NS records for subdomains during Zone import.

    Change-Id: I07829822b8a50b0bff0b28370d9d6d3faacd445c
    Closes-Bug: 1747016
    (cherry picked from commit f84aeaeefe8bad73fcbc718b06c0c63357856fac)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 6.0.1

This issue was fixed in the openstack/designate 6.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/designate 7.0.0.0b1

This issue was fixed in the openstack/designate 7.0.0.0b1 development milestone.

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.