Designate DNS – NS type recordset is not created for Secondary type zone

Bug #1940563 reported by Arkady Shtempler
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Designate
In Progress
Undecided
Mitya Eremeev

Bug Description

### Scenario ###
Create a Secondary type zone
Note: it's possible to use Bind fpr AXFR
Once Zone is active list zones with:"openstack zone list"

### Expected result ###
NS and SOA type records are automatically created.
Note: this is how it works for a Primary zone and it expected to be the same for a Secondary zone.

### Actual Result ###
Only SOA recordset is created.

(openstack) zone show ecea85da-f3ac-4948-b616-87e740ccf45f
+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| action | NONE |
| attributes | |
| created_at | 2021-08-18T10:54:18.000000 |
| description | None |
| email | <email address hidden> |
| id | ecea85da-f3ac-4948-b616-87e740ccf45f |
| masters | 10.35.64.8 |
| name | debuntu.foo. |
| pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id | 814452a9efd84ceab74b6d05ee025d82 |
| serial | 1 |
| status | ACTIVE |
| transferred_at | None |
| ttl | 3600 |
| type | SECONDARY |
| updated_at | 2021-08-18T10:54:23.000000 |
| version | 2 |
+----------------+--------------------------------------+
(openstack) recordset list ecea85da-f3ac-4948-b616-87e740ccf45f
+--------------------------------------+--------------+------+-----------------------------------------------------------------+--------+--------+
| id | name | type | records | status | action |
+--------------------------------------+--------------+------+-----------------------------------------------------------------+--------+--------+
| 95fe4824-1925-4a94-bb53-46e244e2db06 | debuntu.foo. | SOA | ns1.devstack.org. hostmaster.example.com. 1 3563 600 86400 3600 | ACTIVE | NONE |
+--------------------------------------+--------------+------+-----------------------------------------------------------------+--------+--------+

Revision history for this message
Mitya Eremeev (mitos) wrote :

I suppose you use Openstack version before Yoga.

Reproduced the bug in Victoria version.
Found error messages in designate mdns log:

2022-05-13 10:33:27.859 11 INFO designate.dnsutils [req-c8db1305-c9be-4f82-9191-0d30792319f4 4d81fe6db2cc473082ff2590e363651f 094a78d8bd52449884839b0c51a97e65 - - -] Doing AXFR for example.ru. from {'zone_id': '12cf8890-252f-4115-ad6c-1f9bc853e2ca', 'host': '100.66.48.209', 'port': 53, 'id': 'ce6c35f4-3293-4e17-82b7-4a06bf1d753d', 'created_at': datetime.datetime(2022, 5, 13, 10, 33, 27), 'updated_at': None, 'version': 1}
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils [req-c8db1305-c9be-4f82-9191-0d30792319f4 4d81fe6db2cc473082ff2590e363651f 094a78d8bd52449884839b0c51a97e65 - - -] Problem doing AXFR example.ru. from {'zone_id': '12cf8890-252f-4115-ad6c-1f9bc853e2ca', 'host': '100.66.48.209', 'port': 53, 'id': 'ce6c35f4-3293-4e17-82b7-4a06bf1d753d', 'created_at': datetime.datetime(2022, 5, 13, 10, 33, 27), 'updated_at': None, 'version': 1}. Trying next server.: TypeError: '>' not supported between instances of 'float' and 'NoneType'
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils Traceback (most recent call last):
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils File "/var/lib/openstack/lib/python3.8/site-packages/designate/dnsutils.py", line 359, in do_axfr
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils raw_zone = dns.zone.from_xfr(xfr, relativize=False)
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils File "/var/lib/openstack/lib/python3.8/site-packages/dns/zone.py", line 1106, in from_xfr
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils for r in xfr:
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils File "/var/lib/openstack/lib/python3.8/site-packages/dns/query.py", line 611, in xfr
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils if mexpiration is None or mexpiration > expiration:
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils TypeError: '>' not supported between instances of 'float' and 'NoneType'
2022-05-13 10:33:27.885 11 ERROR designate.dnsutils
2022-05-13 10:33:27.888 11 WARNING designate.mdns.xfr [req-c8db1305-c9be-4f82-9191-0d30792319f4 4d81fe6db2cc473082ff2590e363651f 094a78d8bd52449884839b0c51a97e65 - - -] XFR failed for example.ru.. No servers in [{'zone_id': '12cf8890-252f-4115-ad6c-1f9bc853e2ca', 'host': '100.66.48.209', 'port': 53, 'id': 'ce6c35f4-3293-4e17-82b7-4a06bf1d753d', 'created_at': datetime.datetime(2022, 5, 13, 10, 33, 27), 'updated_at': None, 'version': 1}] was reached.: designate.exceptions.XFRFailure: XFR failed for example.ru.. No servers in [{'zone_id': '12cf8890-252f-4115-ad6c-1f9bc853e2ca', 'host': '100.66.48.209', 'port': 53, 'id': 'ce6c35f4-3293-4e17-82b7-4a06bf1d753d', 'created_at': datetime.datetime(2022, 5, 13, 10, 33, 27), 'updated_at': None, 'version': 1}] was reached.

This error in dnspython was fixed in version 2:
https://github.com/rthalley/dnspython/commit/9fbf9b223dc26262b1cf23f623f89283ee9c8375

Openstack bumped dnspython to version 2 in Yoga.
Need some workaround for openstack version prior Yoga.

Changed in designate:
assignee: nobody → Mitya Eremeev (mitos)
status: New → In Progress
Revision history for this message
Michael Johnson (johnsom) wrote :

Yes, this is a side effect of the switch in python3 that changed [1] how > comparisons with None.
All active versions of Designate stable releases, prior to yoga, that run on python3 will need to be corrected. (Usurri, Victoria, Wallaby, Xena) We would start at Xena and backport from there.

[1] https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons

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

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/designate/+/865843

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on designate (stable/victoria)

Change abandoned by "mitya-eremeev-2 <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/designate/+/864058
Reason: please review https://review.opendev.org/c/openstack/designate/+/865843

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on designate (stable/xena)

Change abandoned by "Elod Illes <email address hidden>" on branch: stable/xena
Review: https://review.opendev.org/c/openstack/designate/+/865843
Reason: stable/xena branch of openstack/designate is about to be deleted. To be able to do that, all open patches need to be abandoned. Please cherry pick the patch to unmaintained/xena if you want to further work on this patch.

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.