Bug 2097444 - OVS minimum bandwidth is not cleaned when network policy is removed from port
Summary: OVS minimum bandwidth is not cleaned when network policy is removed from port
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z4
: 16.2 (Train on RHEL 8.4)
Assignee: Rodolfo Alonso
QA Contact: Maor
URL:
Whiteboard:
Depends On:
Blocks: 2099599
TreeView+ depends on / blocked
 
Reported: 2022-06-15 17:21 UTC by Ricardo Diaz
Modified: 2022-12-07 19:27 UTC (History)
10 users (show)

Fixed In Version: openstack-neutron-15.3.5-2.20220805134931.7740ed0.el8ost
Doc Type: Known Issue
Doc Text:
There is currently a known issue that the OVS minimum bandwidth value is not cleared from the port when a user removes the network policy. The workaround is to manually delete the Queue register from the OVS database: + ---- $ ovs-vsctl destroy Queue <queue_uuid> ---- + You can locate the Queue register by looking for the Queue `external_ids:port` reference, that contains the Neutron port ID.
Clone Of:
: 2099599 (view as bug list)
Environment:
Last Closed: 2022-12-07 19:27:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1977819 0 None None None 2022-06-20 15:11:38 UTC
OpenStack gerrit 844927 0 None MERGED [OVS][QoS] Unset the min-bw QoS from the phys bridge interface 2022-07-29 11:05:14 UTC
OpenStack gerrit 846963 0 None MERGED [OVS][QoS] Unset the min-bw QoS from the phys bridge interface 2022-07-29 11:05:15 UTC
Red Hat Issue Tracker OSP-15776 0 None None None 2022-06-15 17:28:02 UTC
Red Hat Product Errata RHSA-2022:8855 0 None None None 2022-12-07 19:27:50 UTC

Description Ricardo Diaz 2022-06-15 17:21:46 UTC
Description of problem:

When configuring a network qos policy with a rule create of type minimum-bandwidth  and then that port and/or policy is deleted the OVS configuration on compute is not deleted.

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

How reproducible:
100%

Steps to Reproduce:
1. openstack port create --network <NETWORK_NAME> --vnic-type normal PORT1
2. openstack server create --flavor <FLAVOR> --image <IMAGE> --nic port-id=<PORT_ID> VM1
3. openstack network qos policy create QP1
4. openstack network qos rule create --type minimum-bandwidth --min-kbps 4000000 --egress QP1
5. openstack port set --qos-policy QP1 PORT1
6. openstack port unset --qos-policy PORT1
7. openstack port delete PORT1

Actual results:

[root@computehwoffload-0 neutron]# ovs-vsctl list queue
_uuid               : 63cc8f76-095b-4d6c-b1be-e07dc2df9190
dscp                : []
external_ids        : {port="2d234824-2bb8-4ec9-abcf-0beeb7d5714a", queue-num="37", type=minimum_bandwidth}
other_config        : {max-rate="34359738367", min-rate="4000000000"}
[root@computehwoffload-0 neutron]# ovs-vsctl list qos
_uuid               : e522c28e-937b-4dd3-8236-6a79640206b3
external_ids        : {_type=minimum_bandwidth, id="74797f4b-fe45-440f-a3ba-0828869f03e4"}
other_config        : {max-rate="34359738367"}
queues              : {37=63cc8f76-095b-4d6c-b1be-e07dc2df9190}
type                : linux-htb
[root@computehwoffload-0 neutron]# tc class show dev mx-bond
class htb 1:26 parent 1:fffe prio 0 rate 4Gbit ceil 34359Mbit burst 9000b cburst 8589b 
class htb 1:1 parent 1:fffe prio 0 rate 72Kbit ceil 34359Mbit burst 9063b cburst 8589b 
class htb 1:fffe root rate 34359Mbit ceil 34359Mbit burst 8589b cburst 8589b 


Expected results:

Minimum bandwidth cleaned from OVS configuration.

Additional info:

Comment 13 Greg Rakauskas 2022-06-21 18:10:35 UTC
Hi Rodolfo,

Thanks for your feedback.

How does this edit look (below)?

Thanks,
--Greg


PROPOSED DOC TEXT EDIT
----------------------
There is currently a known issue that the ML2/OVS minimum bandwidth value is not
cleared from the RHOSP Networking service (neutron) port when a user removes
the network policy.

Workaround: manually delete the queue register from the OVS database, by using
this command:

   $ ovs-vsctl destroy Queue <queue_register_uuid>

Determine the queue register by locating the queue "external_ids:port" reference
for the RHOSP Networking service port.

Comment 23 Ricardo Diaz 2022-09-23 10:13:18 UTC
Bug fixed.

QoS policy creation:

(overcloud) $ openstack network qos policy create qp1
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field       | Value                                                                                                                                                            |
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| description |                                                                                                                                                                  |
| id          | 74e2cd21-2351-45a2-b55e-141bcae5dabe                                                                                                                             |
| is_default  | False                                                                                                                                                            |
| location    | cloud='', project.domain_id=, project.domain_name='Default', project.id='769955e203b54a9a9eff4fc40dc1a48f', project.name='admin', region_name='regionOne', zone= |
| name        | qp1                                                                                                                                                              |
| project_id  | 769955e203b54a9a9eff4fc40dc1a48f                                                                                                                                 |
| rules       | []                                                                                                                                                               |
| shared      | False                                                                                                                                                            |
| tags        | []                                                                                                                                                               |
+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+

(overcloud) $ openstack network qos rule create --type minimum-bandwidth --min-kbps 4000000 --egress qp1
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field      | Value                                                                                                                                                            |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| direction  | egress                                                                                                                                                           |
| id         | 8f862a81-5b31-45c4-9992-5100db0c729f                                                                                                                             |
| location   | cloud='', project.domain_id=, project.domain_name='Default', project.id='769955e203b54a9a9eff4fc40dc1a48f', project.name='admin', region_name='regionOne', zone= |
| min_kbps   | 4000000                                                                                                                                                          |
| name       | None                                                                                                                                                             |
| project_id |                                                                                                                                                                  |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Set qos policy qp1 to port1:

(overcloud) $ openstack port set --qos-policy qp1 port1
(overcloud) $ openstack port show port1 -c qos_policy_id
+---------------+--------------------------------------+
| Field         | Value                                |
+---------------+--------------------------------------+
| qos_policy_id | 74e2cd21-2351-45a2-b55e-141bcae5dabe |
+---------------+--------------------------------------+


On compute, minimum bandwidth properly configured:

[root@compute-0 ~]# tc class show dev mx-bond
class htb 1:1 parent 1:fffe prio 0 rate 72Kbit ceil 34359Mbit burst 9063b cburst 8589b 
class htb 1:fffe root rate 34359Mbit ceil 34359Mbit burst 8589b cburst 8589b 
class htb 1:7 parent 1:fffe prio 0 rate 4Gbit ceil 34359Mbit burst 9000b cburst 8589b 

[root@compute-0 ~]# ovs-vsctl list queue
_uuid               : 2ef47fe0-ec52-4abd-bf14-b7e2066f3ea8
dscp                : []
external_ids        : {port="afe8b898-7580-4703-8702-989d1d742477", queue-num="6", type=minimum_bandwidth}
other_config        : {max-rate="34359738367", min-rate="4000000000"}

[root@compute-0 ~]# ovs-vsctl list qos
_uuid               : 4156bac3-293c-40a0-82da-1d46097943d7
external_ids        : {_type=minimum_bandwidth, id="67f94193-be02-441d-90a9-8523b49f98f8"}
other_config        : {max-rate="34359738367"}
queues              : {6=2ef47fe0-ec52-4abd-bf14-b7e2066f3ea8}
type                : linux-htb


Remove QoS from port:

(overcloud) $ openstack port unset --qos-policy port1
(overcloud) $ openstack port show port1 -c qos_policy_id
+---------------+-------+
| Field         | Value |
+---------------+-------+
| qos_policy_id | None  |
+---------------+-------+


On compute, no error in openvswitch-agent.log:

2022-09-23 09:49:43.606 29243 DEBUG neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-dee4173d-b059-4f89-ad3b-4cf66b040ee1 - - - - -] Starting to process devices in:{'current': {'afe8b898-7580-4703-8702-989d1d742477'}, 'added': set(), 'removed': set(), 'updated': {'afe8b898-7580-4703-8702-989d1d742477'}, 're_added': set()} rpc_loop /usr/lib/python3.6/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py:2735                                                                                                           
2022-09-23 09:49:43.607 29243 DEBUG neutron.agent.rpc [req-dee4173d-b059-4f89-ad3b-4cf66b040ee1 - - - - -] Returning: {'device': 'afe8b898-7580-4703-8702-989d1d742477', 'device_id': '3a68149c-9e6f-4212-aa8f-3a703f0226c8', 'network_id': '32c98cb1-9e00-4a76-9e15-3e01d5972e4a', 'port_
id': 'afe8b898-7580-4703-8702-989d1d742477', 'mac_address': 'fa:16:3e:cb:65:e3', 'admin_state_up': True, 'status': 'ACTIVE', 'network_type': 'vlan', 'segmentation_id': 164, 'physical_network': 'mx-network', 'fixed_ips': [{'subnet_id': '3a191ae5-067f-42ac-a404-d0e97f3c01cb', 'ip_address': '30.30.220.199'}], 'device_owner': 'compute:nova', 'allowed_address_pairs': [], 'port_security_enabled': True, 'qos_policy_id': None, 'network_qos_policy_id': None, 'profile': {}, 'vif_type': 'ovs', 'vnic_type': 'normal', 'security_groups': ['f9e006d4-4b2f-4362-8b28-e18ed242
4752'], 'migrating_to': None} get_device_details /usr/lib/python3.6/site-packages/neutron/agent/rpc.py:374                                                                                                                                                                                
2022-09-23 09:49:43.608 29243 DEBUG neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-dee4173d-b059-4f89-ad3b-4cf66b040ee1 - - - - -] Processing port: afe8b898-7580-4703-8702-989d1d742477 treat_devices_added_or_updated /usr/lib/python3.6/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py:1961                                                                                                                                                                                                                              
2022-09-23 09:49:43.608 29243 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-dee4173d-b059-4f89-ad3b-4cf66b040ee1 - - - - -] Port afe8b898-7580-4703-8702-989d1d742477 updated. Details: {'device': 'afe8b898-7580-4703-8702-989d1d742477', 'device_id': '3a681
49c-9e6f-4212-aa8f-3a703f0226c8', 'network_id': '32c98cb1-9e00-4a76-9e15-3e01d5972e4a', 'port_id': 'afe8b898-7580-4703-8702-989d1d742477', 'mac_address': 'fa:16:3e:cb:65:e3', 'admin_state_up': True, 'status': 'ACTIVE', 'network_type': 'vlan', 'segmentation_id': 164, 'physical_netwo
rk': 'mx-network', 'fixed_ips': [{'subnet_id': '3a191ae5-067f-42ac-a404-d0e97f3c01cb', 'ip_address': '30.30.220.199'}], 'device_owner': 'compute:nova', 'allowed_address_pairs': [], 'port_security_enabled': True, 'qos_policy_id': None, 'network_qos_policy_id': None, 'profile': {}, 'vif_type': 'ovs', 'vnic_type': 'normal', 'security_groups': ['f9e006d4-4b2f-4362-8b28-e18ed2424752'], 'migrating_to': None}                                                                                                                                                               
2022-09-23 09:49:43.609 29243 DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Running txn n=1 command(idx=0): DbSetCommand(table=Port, record=tapafe8b898-75, col_values=(('other_config', {'net_uuid': '32c98cb1-9e00-4a76-9e15-3e01d5972e4a', 'network_type': 'vlan', 'physical_network':
 'mx-network', 'segmentation_id': '164', 'tag': '2'}),)) do_commit /usr/lib/python3.6/site-packages/ovsdbapp/backend/ovs_idl/transaction.py:89                                                                                                                                            2022-09-23 09:49:43.609 29243 DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Transaction caused no change do_commit /usr/lib/python3.6/site-packages/ovsdbapp/backend/ovs_idl/transaction.py:139                                                                                          2022-09-23 09:49:43.610 29243 DEBUG oslo_concurrency.lockutils [req-dee4173d-b059-4f89-ad3b-4cf66b040ee1 - - - - -] Lock "qos-port" acquired by "neutron.agent.l2.extensions.qos.QosAgentExtension.handle_port" :: waited 0.000s inner /usr/lib/python3.6/site-packages/oslo_concurrency/l
ockutils.py:327                                                                                                                                                                                                                                                                           2022-09-23 09:49:43.610 29243 DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Running txn n=1 command(idx=0): DbSetCommand(table=Interface, record=tapafe8b898-75, col_values=(('ingress_policing_rate', 0),)) do_commit /usr/lib/python3.6/site-packages/ovsdbapp/backend/ovs_idl/transact
ion.py:89                                                                                                                                                                                                                                                                                 2022-09-23 09:49:43.610 29243 DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Running txn n=1 command(idx=1): DbSetCommand(table=Interface, record=tapafe8b898-75, col_values=(('ingress_policing_burst', 0),)) do_commit /usr/lib/python3.6/site-packages/ovsdbapp/backend/ovs_idl/transac
tion.py:89                                                                                                                                                                                                                                                                                
2022-09-23 09:49:43.611 29243 DEBUG ovsdbapp.backend.ovs_idl.transaction [-] Transaction caused no change do_commit /usr/lib/python3.6/site-packages/ovsdbapp/backend/ovs_idl/transaction.py:139

Comment 34 errata-xmlrpc 2022-12-07 19:27:22 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 (Moderate: Red Hat OpenStack Platform 16.2.4 (openstack-neutron) security update), 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/RHSA-2022:8855


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