28286 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez
bfd32488a6 Remove the tenant_id/project_id parameter from QoS rule commands
Removed the tenant_id/project_id parameter from any QoS rule command
in the fullstack framework.

Closes-Bug: #2074360
Related-Bug: #2022043
Change-Id: I18efb28ffc02323e82f6b116a3f713cb9e2a132e
2024-07-24 07:10:13 +00:00
Brian Haley
a1d39a2132 Increase code coverage for OVN metadata agent
Add test for _get_instance_and_project_id() that returns
two ports, a failure path.

TrivialFix

Change-Id: Ic731ae612b73d09dcd01d20c4a3d439471d4b1e2
2024-07-28 19:34:47 -04:00
Zuul
fd6012e24d Merge "[Docs] Add document with description of the RBAC roles" 2024-07-26 13:50:16 +00:00
Zuul
29de222623 Merge "Add ML2/OVN security group logging documentation" 2024-07-26 12:37:35 +00:00
Slawek Kaplonski
aa5b2808a8 [Docs] Add document with description of the RBAC roles
This patch adds short document with description of the roles supported
by the default Neutron's API policies.

Change-Id: Id8106478fc32cd2da283fa4b5763d535372127a6
2024-07-24 22:12:39 +02:00
Zuul
725f3cbd8e Merge "Actualy set global "removal limit" options" 2024-07-22 20:47:07 +00:00
Zuul
f6c657624b Merge "Use convert_version_to_tuple() instead of pkg_resources" 2024-07-22 19:21:22 +00:00
Terry Wilson
b4c8cc600a Actualy set global "removal limit" options
Neither fdb_removal_limit nor mac_binding_removal_limit config
options currently get set in the OVN DB. This patch corrects that
and adds missing testing for the MAC_Binding aging maintenance
task.

Fixes: 0a554b4f29 ("Add support for OVN MAC_Binding aging")
Fixes: 1e9f50c736 ("Add support for FDB aging")
Closes-Bug: #2073309
Change-Id: I80d79faeb9f1057d398ee750ae6e246598fd13d2
2024-07-22 08:10:00 -05:00
Zuul
024c890921 Merge "Add "subnet-external-network" extension to "subnet" resource" 2024-07-22 10:32:05 +00:00
Zuul
2efa0da955 Merge "[OVN] Remove maintenance method "remove_duplicated_chassis_registers"" 2024-07-22 09:40:19 +00:00
Zuul
bd35de886d Merge "[DHCP] Inform about the number of pending events to be processed" 2024-07-22 06:58:18 +00:00
Zuul
045530814f Merge "[OVN] Add support for broadcast_arps_to_all_routers" 2024-07-19 20:44:01 +00:00
Zuul
2a1e1fd4cf Merge "Log the number of RPC workers created" 2024-07-19 15:57:46 +00:00
Elvira García
ec5248dc2e Add ML2/OVN security group logging documentation
Previously there was a guide on how the network logging feature worked,
but it was centered around ML2/OVS. This adds more details and
information on how to create and manage network log objects when using
ML2/OVN.

Change-Id: I0eca448d79488ff66203fee7999b1df31f5ed44d
Signed-off-by: Elvira García <egarciar@redhat.com>
2024-07-19 15:35:48 +00:00
Brian Haley
41dcac598b Use convert_version_to_tuple() instead of pkg_resources
In [0] when we changed code to consistently use
convert_version_to_tuple() instead of the packaging
library, one place was missed since it used the
pkg_resources library. Change to use the same code
throughout the tree for version checks.

Also fixes a pylint warning as the pkg_resources API
usage generates a DeprecationWarning.

[0] https://review.opendev.org/c/openstack/neutron/+/890162

TrivialFix

Change-Id: I54e4e310b660acf3dd4cf07a50636512904b578c
2024-07-19 11:11:54 -04:00
Rodolfo Alonso Hernandez
836fd55073 [OVN] Remove maintenance method "remove_duplicated_chassis_registers"
Since OVN 21.03.0 [1], ovn-controller no longer will try to reuse the
stale Chassis/Chassis_Private records but will try to create new ones.
If the stale records have no been manually deleted and ovn-controller
tries to register a new Chassis with the same values, the transaction will
fail.

[1]fc359bfe93

Closes-Bug: #2073613
Change-Id: I2f14558b0910fed03fe0243c4daa33947feeedcb
2024-07-19 15:01:50 +00:00
Rodolfo Alonso Hernandez
88e83dc7f0 [DHCP] Inform about the number of pending events to be processed
After the execution of an RPC event received, the DHCP agent will log
the number of pending events stored in ``DhcpAgent._queue``, that is a
``ResourceProcessingQueue`` instance.

This patch also improves the ``DictModel`` class. When an instance of
this class is printed in a log message, the ``__repr__`` method will
call the ``__str__`` method, that returns the key/values stored in the
local dictionary.

Closes-Bug: #2073490
Change-Id: I69dc6235f7599b687e49428aaa02c4b70154f393
2024-07-19 14:29:04 +00:00
Zuul
ed927f8485 Merge "Remove Open vSwitch plugin mentioned in allowed address pairs note" 2024-07-19 07:49:30 +00:00
Zuul
1de6da6b1d Merge "[DHCP] Lock the execution of `_dhcp_ready_ports_loop`" 2024-07-18 21:37:26 +00:00
Zuul
2872b17ed7 Merge "[DHCP] Do not force the DHCP disable call in a network creation" 2024-07-18 21:07:14 +00:00
Jakub Libosvar
46daad6f57 Remove Open vSwitch plugin mentioned in allowed address pairs note
The plugin was removed almost 10 years ago. The doc part is confusing
as current operators may understand it as the mechanism driver.

TrivialFix

Change-Id: I2a76002d57f42e10cdf45f3c5bba787d1845152b
2024-07-18 16:45:32 -04:00
Rodolfo Alonso Hernandez
ca92fbe7eb Log the number of RPC workers created
The RPC workers process was not correctly logging the current number of
processes created. If the config variable "rpc_workers" is not defined,
the default "None" value will be used and the number of RPC workers
will be calculated depending on the configured API workers and the
number of CPUs in the system.

Trivial-Fix

Change-Id: I64f0098fda1e2f989c255cc0a7f295e0939b8b75
2024-07-18 14:46:54 +00:00
Rodolfo Alonso Hernandez
413793fa08 Add "subnet-external-network" extension to "subnet" resource
Added a new extension called "subnet-external-network". This extension
adds a new field to the subnet resource: "router:external". It is named
after the field "router:external" in the network resource. The subnet
inherits the value form the network it belongs.

Subnet OVO: the subnet OVO receives a new field called "external", same
as the network OVO. It is a synthetic field inherited from the network
one.

Filter query: same as the network database query, the subnet database
query receives a new extra filter to add the action
"access_as_external", inherited from the network RBAC. It is needed
to be able to retrieve these subnets that belong to external network
and thus visible by a non-admin user.

The minimum neutron-lib version required is 3.11.0 that contains the
patch [1].

[1]https://review.opendev.org/c/openstack/neutron-lib/+/907949

Depends-On: https://review.opendev.org/c/openstack/tempest/+/922938
Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/922711
Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/912273

Closes-Bug: #2051831
Change-Id: Ice91de9ae7f82b983579272af6e2bf10c3a02dbf
2024-07-18 11:17:58 +00:00
Zuul
7a28f84ab3 Merge "Change to new syntax of calling super() in policies unit tests modules" 2024-07-18 11:14:39 +00:00
Zuul
ef97f91d0e Merge "Adding manager role support" 2024-07-18 11:14:34 +00:00
Rodolfo Alonso Hernandez
a45883ca19 [DHCP] Lock the execution of `_dhcp_ready_ports_loop`
The method ``DhcpAgent._dhcp_ready_ports_loop`` is updating the
instance variables ``dhcp_prio_ready_ports`` and ``dhcp_ready_ports``.
These variables are also updated by the ``sync_state`` method (that
performs an update of the current status of a network). The related
method should be executed inside a context lock to avoid interferences
from other threads.

NOTE: this patch is similar to [1] (that was correctly reverted in [2]
due to the high error rate in the CI). This new patch changes the
decorator method for the ``dhcp_ready_ports_loop``. The method no longer
retrieves the sync lock in write mode but in read mode. It will need to
wait only if the syncing method is running; otherwise, it will be
allowed to run and modify ``self.dhcp_prio_ready_ports`` and
``self.dhcp_ready_ports``.

[1]https://review.opendev.org/c/openstack/neutron/+/923625
[2]https://review.opendev.org/c/openstack/neutron/+/924213

Related-Bug: #2070376
Change-Id: Ic132dc49142b380f1752c9307b50afd1ce2378b0
2024-07-18 11:13:45 +00:00
Zuul
fad8602725 Merge "Don't send project_id as QoS rule attribute in the tests" 2024-07-18 08:22:03 +00:00
Zuul
5bfd922f00 Merge "Adjust flavor extension unit test to case when tenant_id is not there" 2024-07-18 08:21:53 +00:00
Rodolfo Alonso Hernandez
7173bd4e98 [DHCP] Do not force the DHCP disable call in a network creation
During a network creation, the code added to support multiple network
segments [1] was first disabling any existing DHCP namespace (including
the namespace deletion, the driver removal and the DHCP port deletion)
and the re-creating it again. The execution of both actions one after
the other was triggering a race condition where the DHCP namespace was
left without the DHCP port.

[1]https://review.opendev.org/c/openstack/neutron/+/840421

Closes-Bug: #2073464
Change-Id: Ic688d1c721511868b7bd9943bb679c4cb91b1a60
2024-07-18 08:19:55 +00:00
Zuul
5a6b916d95 Merge "[FT] Make LR name random" 2024-07-17 19:44:30 +00:00
Zuul
9089232090 Merge "Use parent's project id in the quota enforcement for some resources" 2024-07-17 17:44:40 +00:00
Rodolfo Alonso Hernandez
ed303c464e [FT] Make LR name random
In the ``TestNbApi`` tests, make the Logical_Router name random.
This patch also makes use of the ``lookup`` method to retrieve
a DB row from the database.

Closes-Bug: #2073387
Change-Id: I304c5199815ff583ac306f4de6cea771fdf00391
2024-07-17 13:43:11 +00:00
Zuul
9b6c485b93 Merge "[WSGI] Move all OVS jobs to use WSGI API module" 2024-07-17 11:45:50 +00:00
Zuul
3532994316 Merge "Limit the worker type in neutron-periodic-workers service" 2024-07-17 11:17:53 +00:00
Zuul
b197ebda31 Merge "Revert "[DHCP] Lock the execution of `_dhcp_ready_ports_loop`"" 2024-07-17 06:12:02 +00:00
eb09fe5c92 Revert "[DHCP] Lock the execution of `_dhcp_ready_ports_loop`"
This reverts commit 928f41f1feac6511b4bb67e6211b4f06a9b7ca56.

Reason for revert: Jobs failing randomly as mentioned in lp#2073251

Change-Id: Ib4ea8a31f785cd52407c1aa241501046e5e295e2
Related-Bug: #2070376
Related-Bug: #2073251
2024-07-16 11:10:31 +00:00
Zuul
260233182a Merge "Don't print traceback if standard attr is missing on update" 2024-07-16 10:20:54 +00:00
Jakub Libosvar
8ab385f97d Don't print traceback if standard attr is missing on update
If northd is very busy, it may happen port is deleted when handling an
LSP down event causing standard attribute being gone when bumping ovn
revision number. This is because the port is set down in SB DB first and
then northd propagates that to NB DB, and then the event is emited.

This patch just makes sure the traceback is not printed in case this
happens.

TrivialFix
Closes-bug: #2069442

Change-Id: I7d21e4adc27fab411346e0458c92191e69ce6b30
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
2024-07-15 19:11:00 +00:00
Lucas Alvares Gomes
f651b28c42 [OVN] Add support for broadcast_arps_to_all_routers
This patch introduces a new configuration option for OVN called
"broadcast_arps_to_all_routers". This option is responsible for
configuring the external networks with the 'broadcast-arps-to-all-routers'
configuration from OVN 23.06 and newer. By enabling this option (default)
OVN will flood ARP requests to all attached ports on a network. If
disabled, ARP requests are only sent to routers on that network if the
target MAC address matches. ARP requests that does not match a router
will only be forwarded to non-router ports.

Closes-Bug: #2071818
Change-Id: Id16b16113420e9f024e1936f9427824d711b6d30
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2024-07-15 13:26:52 +00:00
Zuul
6450d30667 Merge "[DHCP] Reduce to one single thread the event processing" 2024-07-11 22:55:23 +00:00
Lucas Alvares Gomes
d0d24f0aff [OVN] Update Baremetal provisioning documentation
Support for IPv6 iPXE chainloading [0] and Neutron integration [1] has
already landed.

This patch updates the Baremetal provisioning guide to reflect on these
changes.

[0] c5fd51bd15
[1] https://review.opendev.org/c/openstack/neutron/+/890683

Change-Id: I58390ec957146da3de84ef2bbc88e409360945d1
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2024-07-11 14:59:06 +00:00
Zuul
a8bdcc768a Merge "Always get local vlan from port other_config" 2024-07-11 07:37:37 +00:00
Zuul
2b5d080afb Merge "Refactor external-network update to router gateway cascading effect" 2024-07-10 19:51:06 +00:00
Zuul
5b50498d8b Merge "Check subnet service_type for subnet_create" 2024-07-10 19:51:02 +00:00
Zuul
1bde058c51 Merge "Change the "get_metadata_port" name and input variable" 2024-07-10 19:50:58 +00:00
Slawek Kaplonski
7e73d41e9e Change to new syntax of calling super() in policies unit tests modules
TrivialFix

Change-Id: Iab1a84aa3503158b2878bc724b930761d0859050
2024-07-10 14:32:03 +02:00
Slawek Kaplonski
7c7dc26a01 Adding manager role support
This patch adds support for the MANAGER role in the Neutron API's
policies.
It also adds unit tests to cover MANAGER role privileges in all APIs.

This is implementation of the phase 3 of the Secure RBAC community goal
[1]

[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#phase-3

Change-Id: I377449050cb8aba56e167eba0981213831b8d7f2
2024-07-10 14:15:47 +02:00
Rodolfo Alonso Hernandez
a266965f53 [OVN] Iterate through table rows using `row.items()`
The access to ``row.data`` is not recommended, instead of this it is
possible to iterate through a table items directly over the row
elements.

Related-Bug: #2072545
Change-Id: I24f7bb355d2e79ec6104569903e7d852933393a1
2024-07-09 15:08:15 +00:00
Zuul
4a5e3e1623 Merge "[DHCP] Lock the execution of `_dhcp_ready_ports_loop`" 2024-07-10 00:24:31 +00:00
Zuul
eaac01c0ad Merge "[DHCP] Skip metadata proxy timeout in unit testing" 2024-07-09 19:44:58 +00:00