Bug 1893668 - Neutron - “dns_name” is set to None when the “dns” extension is missing
Summary: Neutron - “dns_name” is set to None when the “dns” extension is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-networking-ovn
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ga
: 16.2 (Train on RHEL 8.4)
Assignee: Slawek Kaplonski
QA Contact: Maor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-02 10:37 UTC by Arkady Shtempler
Modified: 2022-02-04 16:50 UTC (History)
6 users (show)

Fixed In Version: python-networking-ovn-7.3.1-1.20210409093429.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-04 16:50:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1906311 0 None None None 2020-11-30 22:03:59 UTC
OpenStack gerrit 764831 0 None MERGED Disable dns-integration API extension if it's not enabled in ML2 2021-02-02 08:39:15 UTC
Red Hat Issue Tracker OSP-2120 0 None None None 2022-01-09 14:05:00 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:10:12 UTC

Description Arkady Shtempler 2020-11-02 10:37:55 UTC
### Scenario ###
1) Deploy Overcloud without DNS Neutron Plugin Extension.
Do not include the template needed: virt/dns.yaml with the following content:
parameter_defaults:
    ExtraConfig:
        neutron::dns_domain: openstackgate.local
    NeutronPluginExtensions: qos,port_security,dns

2) Install neutron-tempest-plugin and run: “test_create_update_port_with_dns_name” with:
python3 -m testtools.run neutron_tempest_plugin.api.test_ports.PortsTestJSON.test_create_update_port_with_dns_name


### Actual Result ###
1) Tempest test fails(as expected) with:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-
    return func(*func_args, **func_kwargs)
  File "/home/stack/neutron-tempest-
    self.assertEqual('d1', body['dns_name'])
  File "/usr/lib/python3.6/site-
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python3.6/site-
    raise mismatch_error
testtools.matchers._impl.

2) It looks like a given "dns_name" is simply ignored by Neutron and the reason for that is unknown, there is nothing logged on that in neutron logs.

3) API response code is 201 and no error in response body. 
According to API response payload, “dns_name” is actually empty
2020-11-01 10:37:46,251 943702 DEBUG    [tempest.lib.common.rest_
        Body: {"port": {"network_id": "6859d4d1-429a-4b78-8d6e- "dns_name": "d1"}}
    Response - Headers: {'content-type': 'application/json', 'content-length': '877', 'x-openstack-request-id': 'req-f50a1e45-6d93-41f0-aaf8-http://10.0.0.120:9696/v2.0/'}
        Body: b'{"port":{"id":"b1e03f0f-dns_name":"",
}}}


### Expected Result ###
When DNS extension is not set/configured/installed we would expect that the API will fail with 4XX status code + appropriate Error message in response body.

Comment 1 Slawek Kaplonski 2020-11-30 22:04:01 UTC
I found out that this is an issue with ovn_l3 service plugin which loads 'dns-integration' API extension always. As this extension is loaded, it provides "dns_name" attribute so neutron knows it and that's why it don't returns 400 Bad request.
I reported u/s bug for that and proposed fix already. All is linked in that BZ.

Comment 8 errata-xmlrpc 2021-09-15 07:09:53 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 (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), 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-2021:3483


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