Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2290411

Summary: check_port_has_address_scope maintenance task fails on ports without binding:profile
Product: Red Hat OpenStack Reporter: Jakub Libosvar <jlibosva>
Component: openstack-neutronAssignee: Terry Wilson <twilson>
Status: CLOSED ERRATA QA Contact: Renjing Xiao <rxiao>
Severity: high Docs Contact:
Priority: high    
Version: 17.1 (Wallaby)CC: bmv, chrisw, froyo, mariel, mtomaska, ralonsoh, scohen, twilson
Target Milestone: z4Keywords: Regression, Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-18.6.1-17.1.20240821210749.85ff760.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-11-21 09:41:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Libosvar 2024-06-04 16:32:22 UTC
Description of problem:
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [req-b78617f7-7a4f-4b76-836e-16a49c85e3db - - - - -] Failed to update port fd11a4f2-ddc8-47ee-a929-58094f991e06: KeyError: 'binding:profile'
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance Traceback (most recent call last):
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py", line 620, in check_port_has_address_scope
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     self._ovn_client.get_external_ids_from_port(
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 571, in get_external_ids_from_port
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     port_info = self._get_port_options(port)
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 321, in _get_port_options
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     bp_info = utils.validate_and_get_data_from_binding_profile(port)
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/common/ovn/utils.py", line 333, in validate_and_get_data_from_binding_profile
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     binding_profile = copy.deepcopy(port[constants.OVN_PORT_BINDING_PROFILE])
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance KeyError: 'binding:profile'
2024-06-04 15:44:57.785 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance [req-b78617f7-7a4f-4b76-836e-16a49c85e3db - - - - -] Failed to update port d3383efd-d49f-47b8-8723-40fa07b5b6c0: KeyError: 'binding:profile'
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance Traceback (most recent call last):
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/maintenance.py", line 620, in check_port_has_address_scope
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     self._ovn_client.get_external_ids_from_port(
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 571, in get_external_ids_from_port
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     port_info = self._get_port_options(port)
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py", line 321, in _get_port_options
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     bp_info = utils.validate_and_get_data_from_binding_profile(port)
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance   File "/usr/lib/python3.9/site-packages/neutron/common/ovn/utils.py", line 333, in validate_and_get_data_from_binding_profile
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance     binding_profile = copy.deepcopy(port[constants.OVN_PORT_BINDING_PROFILE])
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance KeyError: 'binding:profile'
2024-06-04 15:44:59.885 54 ERROR neutron.plugins.ml2.drivers.ovn.mech_driver.ovsdb.maintenance


Version-Release number of selected component (if applicable):
17.1.3

How reproducible:
Always

Steps to Reproduce:
1. Create a port
2. Wait for the maintenance task
3.

Actual results:


Expected results:


Additional info:

Comment 7 Renjing Xiao 2024-10-11 22:46:16 UTC
Verified with version:
RHOS-17.1-RHEL-9-20240909.n.1
openstack-neutron-1:18.6.1-17.1.20240822200817.85ff760.el9ost.noarch.rpm

This procedure was followed:
1. Create a port
2. Wait for the maintenance task

Topology: 4 computes + 3 controllers

(overcloud) [stack@undercloud-0 ~]$ openstack port create --network  1ad7b135-0679-4c2b-a1cf-24992ab1544b testport
/usr/lib/python3.9/site-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (1.26.5) or chardet (5.2.0) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
+-------------------------+-----------------------------------------------------------------------------------------------------------------+
| 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-10-11T21:29:49Z                                                                                            |
| data_plane_status       | None                                                                                                            |
| description             |                                                                                                                 |
| device_id               |                                                                                                                 |
| device_owner            |                                                                                                                 |
| device_profile          | None                                                                                                            |
| dns_assignment          | fqdn='host-192-168-213-183.openstackgate.local.', hostname='host-192-168-213-183', ip_address='192.168.213.183' |
| dns_domain              |                                                                                                                 |
| dns_name                |                                                                                                                 |
| extra_dhcp_opts         |                                                                                                                 |
| fixed_ips               | ip_address='192.168.213.183', subnet_id='8b2c9cb7-2393-402e-b0c4-9d5998db3929'                                  |
| id                      | 57217e57-cf8d-4723-a0e2-857f7557f188                                                                            |
| ip_allocation           | immediate                                                                                                       |
| mac_address             | fa:16:3e:84:bf:73                                                                                               |
| name                    | testport                                                                                                        |
| network_id              | 1ad7b135-0679-4c2b-a1cf-24992ab1544b                                                                            |
| numa_affinity_policy    | None                                                                                                            |
| port_security_enabled   | True                                                                                                            |
| project_id              | 8868370ca7314561bd87c87a495195e7                                                                                |
| propagate_uplink_status | None                                                                                                            |
| qos_network_policy_id   | None                                                                                                            |
| qos_policy_id           | None                                                                                                            |
| resource_request        | None                                                                                                            |
| revision_number         | 1                                                                                                               |
| security_group_ids      | 8f19670c-9270-4acc-a9b4-e452cdb0c780                                                                            |
| status                  | DOWN                                                                                                            |
| tags                    |                                                                                                                 |
| trunk_details           | None                                                                                                            |
| updated_at              | 2024-10-11T21:29:49Z                                                                                            |
+-------------------------+-----------------------------------------------------------------------------------------------------------------+

Comment 12 errata-xmlrpc 2024-11-21 09:41:03 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 (RHOSP 17.1.4 bug fix and 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/RHBA-2024:9974