Some Port Properties Cannot Be Set

Bug #2049622 reported by Ayhan ilhan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Unassigned

Bug Description

Hi,

Some port properties like dns-name cannot be set. We got mismatch error in some tempest tests as below. I debugged it and i saw that the dns-name properties cannot be set when creating a port. I checked with openstack cli commands and i saw dns-name properties cannot be set. I can set this properties in wallaby version.

Openstack version: Zed
Openstack cli version: 6.4.0

Some Tempest Tests:
neutron_tempest_plugin.scenario.test_internal_dns.InternalDNSTest.test_create_and_update_port_with_dns_name
neutron_tempest_plugin.api.test_ports.PortsTestJSON.test_create_update_port_with_dns_domain
neutron_tempest_plugin.api.test_ports.PortsTestJSON.test_create_update_port_with_dns_name
neutron_tempest_plugin.api.test_revisions.TestRevisions.test_update_dns_domain_bumps_revision

'''
$ openstack port show b976b4c3-7fc6-430a-a587-33520a4b44c0
+-------------------------+------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------+
| admin_state_up | UP |
| allowed_address_pairs | |
| binding_host_id | |
| binding_profile | |
| binding_vif_details | |
| binding_vif_type | unbound |
| binding_vnic_type | normal |
| created_at | 2024-01-17T11:50:45Z |
| data_plane_status | None |
| description | |
| device_id | |
| device_owner | |
| device_profile | None |
| dns_assignment | fqdn='host-10-100-0-10.openstacklocal.', hostname='host-10-100-0-10', ip_address='10.100.0.10' |
| dns_domain | |
| dns_name | |
| extra_dhcp_opts | |
| fixed_ips | ip_address='10.100.0.10', subnet_id='76262d47-90be-4182-9678-8eaa01661851' |
| hints | |
| id | b976b4c3-7fc6-430a-a587-33520a4b44c0 |
| ip_allocation | None |
| mac_address | fa:16:3e:2c:02:19 |
| name | tempest-internal-dns-test-port-853671869 |
| network_id | 3c83b6d4-ca78-4f9e-95dc-3d1dcb662d07 |
| numa_affinity_policy | None |
| port_security_enabled | True |
| project_id | 348a7b15194c4781a27dd64b9511526b |
| propagate_uplink_status | None |
| resource_request | None |
| revision_number | 1 |
| qos_network_policy_id | None |
| qos_policy_id | None |
| security_group_ids | 83fe2642-d8af-40ac-8943-0d63c8c8efbb |
| status | DOWN |
| tags | |
| trunk_details | None |
| updated_at | 2024-01-17T11:50:45Z |
+-------------------------+------------------------------------------------------------------------------------------------+

$ openstack port set --dns-name testdns b976b4c3-7fc6-430a-a587-33520a4b44c0 -vvv
...
REQ: curl -g -i -X PUT https://osp-xx-dev.xxxx.com:9696/v2.0/ports/b976b4c3-7fc6-430a-a587-33520a4b44c0 -H "Content-Type: application/json" -H "User-Agent: openstacksdk/2.0.0 keystoneauth1/5.4.0 python-requests/2.31.0 CPython/3.11.5" -H "X-Auth-Token: {SHA256}xxx" -d '{"port": {"dns_name": "testdns"}}'
https://osp-xxxx-dev.xxxx.com:9696 "PUT /v2.0/ports/b976b4c3-7fc6-430a-a587-33520a4b44c0 HTTP/1.1" 200 980

RESP: [200] content-length: 980 content-type: application/json date: Wed, 17 Jan 2024 11:52:45 GMT x-openstack-request-id: req-137fd8ff-c385-49e8-bb9f-9301c8dc4288

RESP BODY: {"port":{"id":"b976b4c3-7fc6-430a-a587-33520a4b44c0","name":"tempest-internal-dns-test-port-853671869","network_id":"3c83b6d4-ca78-4f9e-95dc-3d1dcb662d07","tenant_id":"348a7b15194c4781a27dd64b9511526b","mac_address":"fa:16:3e:2c:02:19","admin_state_up":true,"status":"DOWN","device_id":"","device_owner":"","fixed_ips":[{"subnet_id":"76262d47-90be-4182-9678-8eaa01661851","ip_address":"10.100.0.10"}],"allowed_address_pairs":[],"extra_dhcp_opts":[],"security_groups":["83fe2642-d8af-40ac-8943-0d63c8c8efbb"],"description":"","binding:vnic_type":"normal","binding:profile":{},"binding:host_id":"","binding:vif_type":"unbound","binding:vif_details":{},"port_security_enabled":true,"dns_name":"","dns_assignment":[{"ip_address":"10.100.0.10","hostname":"host-10-100-0-10","fqdn":"host-10-100-0-10.openstacklocal."}],"dns_domain":"","tags":[],"created_at":"2024-01-17T11:50:45Z","updated_at":"2024-01-17T11:50:45Z","revision_number":1,"project_id":"348a7b15194c4781a27dd64b9511526b"}}
PUT call to network for https://osp-xx-dev.xxxx.com:9696/v2.0/ports/b976b4c3-7fc6-430a-a587-33520a4b44c0 used request id req-137fd8ff-c385-49e8-bb9f-9301c8dc4288
clean_up SetPort:
END return value: 0
...

Regards,

Tags: dns tempest
tags: added: dns
removed: dns-name network neutron neutron-plugin openstack port properties set wallaby zed
Revision history for this message
Brian Haley (brian-haley) wrote :

Hi,

These tests pass in our gate. Do you have your system configured correctly? For example, have you defined a dns_domain value in neutron.conf?

Here's a link to a recent job, if you search for 'dns' you will see all the things it sets:

https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_4ee/905755/2/check/neutron-tempest-plugin-openvswitch/4ee7626/job-output.txt

fyi, that output will not be around forever, but you can look at any recent neutron patch and find a similar job.

Changed in neutron:
status: New → Incomplete
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello:

In order to be able to define the DNS records of a port, you need to enable the extension driver "dns":
  $ cat /etc/neutron/plugins/ml2/ml2_conf.ini
  [ml2]
  extension_drivers = ...,dns

You should also define a DNS domain different from the default one "openstacklocal.". This should be set in the neutron configuration:
  $ cat /etc/neutron/neutron.conf
  [DEFAULT]
  dns_domain = fistro.

Then you'll be able to define a DNS name per port.

Regards.

Changed in neutron:
status: Incomplete → Invalid
Revision history for this message
Ayhan ilhan (ayhanilhan) wrote :

Hi,

I didn't define dns_domain value in neutron.conf at zed version. But i defined wallaby version.

Wallaby Version:
# cat /etc/kolla/neutron-server/ml2_conf.ini
[ml2]
extension_drivers = ...,dns

Zed Version:
# cat /etc/kolla/neutron-server/ml2_conf.ini
[ml2]
extension_drivers = ...,subnet_dns_publish_fixed_ip

Regards,

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.