[Bug 1873091] Re: [RFE] Neutron ports dns_assignment does not match the designate DNS records for Neutron port
Edward Hope-Morley
1873091 at bugs.launchpad.net
Fri Jan 13 19:44:20 UTC 2023
Verified bionic-ussuri with the following output:
# apt-cache policy neutron-common
neutron-common:
Installed: 2:16.4.2-0ubuntu5~cloud0
Candidate: 2:16.4.2-0ubuntu5~cloud0
Version table:
*** 2:16.4.2-0ubuntu5~cloud0 500
500 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-proposed/ussuri/main amd64 Packages
100 /var/lib/dpkg/status
2:12.1.1-0ubuntu8 500
500 http://nova.clouds.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
2:12.0.1-0ubuntu1 500
500 http://nova.clouds.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
$ juju config neutron-api dns-domain
lp1873091-b-u.stsstack.qa.1ss.
$ openstack network show private -c dns_domain -f value
test.dom1.
$ openstack port show bb4bf3e2-41b8-4d58-b9eb-bb3158fa4785 -c dns_assignment -f value
[{'ip_address': '192.168.21.242', 'hostname': 'jammy-194134', 'fqdn': 'jammy-194134.test.dom1.'}]
# ovn-nbctl list dns
_uuid : 7fc67223-c1ca-49da-954b-3e153bee0d90
external_ids : {ls_name=neutron-2dbb5b2b-5d8a-478a-b61c-2dc9bf5710ba}
records : {"242.21.168.192.in-addr.arpa"=jammy-194134.test.dom1, jammy-194134="192.168.21.242", jammy-194134.test.dom1="192.168.21.242"}
$ openstack recordset list 7380cddc-f111-4df7-932e-bde9e87bd2aa
+--------------------------------------+-------------------------+------+----------------------------------------------------------------------------------------+--------+--------+
| id | name | type | records | status | action |
+--------------------------------------+-------------------------+------+----------------------------------------------------------------------------------------+--------+--------+
| a1fcce9f-34b5-45c6-90ef-9731f7294088 | test.dom1. | SOA | ns1.lp1873091-b-u.stsstack.qa.1ss. dnsmaster.test.dom1. 1673638903 3581 600 86400 3600 | ACTIVE | NONE |
| ca1896a7-89e5-4dfc-8c76-630de82e3389 | test.dom1. | NS | ns1.lp1873091-b-u.stsstack.qa.1ss. | ACTIVE | NONE |
| 758dc8b5-771f-42f5-9b60-78b4b4c3cacc | jammy-194134.test.dom1. | A | 192.168.21.242 | ACTIVE | NONE |
+--------------------------------------+-------------------------+------+----------------------------------------------------------------------------------------+--------+--------+
** Tags removed: verification-needed verification-ussuri-needed
** Tags added: verification-done verification-ussuri-done
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1873091
Title:
[RFE] Neutron ports dns_assignment does not match the designate DNS
records for Neutron port
Status in Ubuntu Cloud Archive:
Fix Released
Status in Ubuntu Cloud Archive ussuri series:
Fix Committed
Status in Ubuntu Cloud Archive victoria series:
Fix Released
Status in neutron:
Fix Released
Status in neutron package in Ubuntu:
New
Status in neutron source package in Focal:
Fix Committed
Bug description:
the Neutron port dns_assignment dont match the designate DNS records
assigned to the Neutron port
as explained in the link below
https://docs.openstack.org/neutron/pike/admin/config-dns-int.html
when a user creates a neutron port using the command below
neutron port-create 37aaff3a-6047-45ac-bf4f-a825e56fd2b3 \
--dns-name my-vm --dns_domain port-domain.org.
The actual output for dns_assignment is:
{"hostname": "my-vm", "ip_address": "203.0.113.9", "fqdn": "my-vm.example.org."}
{"hostname": "my-vm", "ip_address": "2001:db8:10::9", "fqdn": "my-vm.example.org."}
and the Designate DNS records is
67a8e83d-7e3c-4fb1-9261-0481318bb7b5 | A | my-vm.port-domain.org. | 203.0.113.9
5a4f671c-9969-47aa-82e1-e05754021852 | AAAA | my-vm.port-domain.org. | 2001:db8:10::9
while the expected output for dns-assignment:
{"hostname": "my-vm", "ip_address": "203.0.113.9", "fqdn": "my-vm.port-domain.org."}
{"hostname": "my-vm", "ip_address": "2001:db8:10::9", "fqdn": "my-vm.port-domain.org."}
most likely right now the dns_domain is taken from the Neutron network
dns_domain or from neutron dns_domain configuration
A good approach would be to always make the dns_assignment for Neutron
port synced with the Designate DNS records if Designate is used
=== Ubuntu SRU Details ===
[Impact]
If a network is created it assumed the dns_domain from neutron.conf if one is not provided when the network is created but if it we expect that one to take precendence. We also expect ports created on this network to use the network dns_domain. This was not happening and is fixed with this patch.
[Test Case]
* deploy Openstack Ussuri
* configure neutron-api dns-domain="test.dom1."
* create a network with --dns-domain test.dom2.
* create a vm with port on that network and check that the port is using test.dom2.
* to check the domain for the new port you can use resolvectl inside the vm (dns_domain on the port i neutron will not be set)
[Where things could go wrong]
This will not fix existing networks and ports but is not expected to cause any regressions.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1873091/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list