28347 Commits

Author SHA1 Message Date
Slawek Kaplonski
fbb7c9ae3d Fix port_hardware_offload_type ML2 extension
This patch fixes 2 issues related to that port_hardware_offload_type
extension:

1. API extension is now not supported by the ML2 plugin directly so if
   ml2 extension is not loaded Neutron will not report that API
   extension is available,
2. Fix error 500 when creating port with hardware_offload_type
   attribute set but when binding:profile is not set (is of type
   Sentinel).

Closes-bug: #2078432
Closes-bug: #2078434
Change-Id: Ib0038dd39d8d210104ee8a70e4519124f09292da
2024-08-30 11:50:55 +02:00
Zuul
d73cc2eff6 Merge "Support nested SNAT for ml2/ovn" 2024-08-29 21:17:33 +00:00
Ihar Hrachyshka
dbf53b7bbf Support nested SNAT for ml2/ovn
When ovn_router_indirect_snat = True, ml2/ovn will set a catch-all snat
rule for each external ip, instead of a snat rule per attached subnet.

NB: This option is global to cluster and cannot be controlled per
project or per router.

NB2: this patch assumes that 0.0.0.0/0 snat rules are properly handled
by OVN. Some (e.g. 22.03 and 24.03) OVN versions may have this scenario
broken. See: https://issues.redhat.com/browse/FDP-744 for details.

--

A long time ago, nested SNAT behavior was unconditionally enabled for
ml2/ovs, see: https://bugs.launchpad.net/neutron/+bug/1386041

Since this behavior has potential security implications, and since it
may not be desired in all environments, a new flag is introduced.

Since OVN was deployed without nested SNAT enabled in multiple
environments, the flag is set to False by default (meaning: no nested
SNAT).

In theory, instead of a config option, neutron could introduce a new API
to allow users to control the behavior per router. This would require
more work though. This granular API is left out of the patch. Interested
parties are welcome to start a discussion about adding the new API as a
new neutron extension to routers.

--

Before this patch, there was an alternative implementation proposed that
was not relying on 0.0.0.0/0 snat behavior implemented properly in OVN.
The implementation was abandoned because it introduced non-negligible
complexity in the neutron code and the OVN NB database.

See: https://review.opendev.org/c/openstack/neutron/+/907504

--

Closes-Bug: #2051935
Co-Authored-By: Brian Haley <haleyb.dev@gmail.com>
Change-Id: I28fae44edc122fae389916e25b3321550de001fd
2024-08-29 09:06:14 -04:00
Zuul
ca5b290f09 Merge "Remove remnants of Open Daylight" 2024-08-29 12:17:40 +00:00
Zuul
edb3a59dc8 Merge "docs: ovs-master jobs do NOT run plugin scenarios" 2024-08-29 12:17:36 +00:00
Zuul
ba3aa87e63 Merge "Use oslo netutils for get_noscope_ipv6 function" 2024-08-28 23:43:23 +00:00
Zuul
32502ac76e Merge "[ML2/OVN] Add external_ids.neutron:is_static_route key for Static Routes" 2024-08-28 23:23:34 +00:00
Zuul
f1585775d9 Merge "Make RPC event cast synchronous with the event" 2024-08-28 18:29:40 +00:00
Zuul
0cd076a7bc Merge "Remove remnants of NSX" 2024-08-28 14:43:47 +00:00
Elvira García
0798f33c01 Use oslo netutils for get_noscope_ipv6 function
We needed to declare get_noscope_ipv6() on ipv6_netutils in Neutron
while this function was made avaliable in oslo.utils. This is not needed
anymore.

Related-Bug: #2073894
Change-Id: I76a1c9f75906e8c0bd0ad368c55f01d58811b42d
2024-08-28 14:18:17 +02:00
Rodolfo Alonso Hernandez
ae90e2ccbf Make RPC event cast synchronous with the event
Sometimes, the methods ``NeutronObject.get_object`` and
``ResourcesPushRpcApi.push`` yield the GIL during the execution.
Because of that, the thread in charge of sending the RPC information
doesn't finish until other operation is pushed (implemented in [1]).

By making the RPC cast synchronous with the update/delete events, it
is ensured that both operations will finish and the agents will receive
the RPC event on time, just after the event happens.

This issue is hitting more frequently in the migration to the WSGI
server, due to [2]. Once the eventlet library has been deprecated from
OpenStack, it will be possible to use the previous model (using a long
thread to handle the RCP updates to the agents). It is commented in the
code as a TODO.

This patch is temporarily reverting [3]. This code should be restored
too.

[1]https://review.opendev.org/c/openstack/neutron/+/788510
[2]https://review.opendev.org/c/openstack/neutron/+/925376
[3]https://review.opendev.org/c/openstack/neutron/+/824508

Closes-Bug: #2077790
Related-Bug: #2075147
Change-Id: I7b806e6de74164ad9730480a115a76d30e7f15fc
2024-08-27 15:11:11 +00:00
Zuul
78459d62dd Merge "Get ips from system dns resolver without scope" 2024-08-27 15:01:44 +00:00
Zuul
93bf25dd9f Merge "Bump `oslo.serialization` to version 5.5.0" 2024-08-27 09:47:49 +00:00
Ihar Hrachyshka
2ca075f152 Remove remnants of NSX
Change-Id: I10f8461f6346bab88913aa2fe88b3a8defc67ee5
2024-08-26 21:31:23 -04:00
Ihar Hrachyshka
78efdb97b1 Remove remnants of Open Daylight
The project was deprecated in Bobcat. Only stable branches may still be
relevant.

Change-Id: Iba6eedcc3363f8a900c2fc0b90b1e0ae4e96bbf9
2024-08-26 21:27:53 -04:00
Zuul
52dfaa344c Merge "Remove dependencies for windows support" 2024-08-26 17:30:43 +00:00
Ihar Hrachyshka
70be32d417 docs: ovs-master jobs do NOT run plugin scenarios
Change-Id: I796cf0f1d6dd88a0790b51410b9256c14c77392a
2024-08-26 13:25:44 -04:00
Zuul
e2bc6a8ef1 Merge "Log a warning if pid file could not be read in l3-agent" 2024-08-26 13:25:24 +00:00
Takashi Kajinami
bd7245e51d Remove dependencies for windows support
... because windows support was removed by [1].

[1] 5d316e8a876baf80b253d799dcd6f82dc8c526ce

Related-Bug: #2015844
Change-Id: I4d60d9faed2ad5862777b38709dcb754f2827a3b
2024-08-24 16:11:10 +00:00
Zuul
f19bbae345 Merge "docs: Clarify fullstack local run procedure" 2024-08-22 19:46:18 +00:00
Ihar Hrachyshka
6e30a825a3 docs: Clarify fullstack local run procedure
First, explain where the repos should be checked out to. Second,
recommend rebooting with the latest distro kernel to avoid ovs module
incompabitilities.

Change-Id: I480ba689a4e20f373e30fe77059474b6dbea5a72
2024-08-22 15:16:29 +00:00
Roberto Bartzen Acosta
89835e43e8 [ML2/OVN] Add external_ids.neutron:is_static_route key for Static Routes
The Neutron owned Static Routes created in the OVN database are marked
with the external_ids key neutron:is_static_route. This mark will be used
by the OVN DB sync tool to distinguish the Neutron created Static Routes
from those added externally; the second ones should not be altered during
the sync process. The static route update task runs only once during the
maintenance task, and if all entries are already configured, no action is
performed.

Related-bug: #2027742
Change-Id: I4226024cb4cfd85bdf4f717d42d48150cab22442
2024-08-21 19:11:07 -03:00
Zuul
b847d89ac1 Merge "Revert "Temporary mark ovs-rally job as non-voting"" 2024-08-21 16:56:28 +00:00
Zuul
0807c94dc9 Merge "Fix support of IPv6 only networks in OVN metadata agent" 2024-08-20 23:16:32 +00:00
Zuul
2a8b262cbb Merge "Add tap_mirror to extension to OVN supported extensions" 2024-08-20 16:27:31 +00:00
a35c2f8c38 Revert "Temporary mark ovs-rally job as non-voting"
This reverts commit ffaf021810fcd8132582de544d3c324c3cc43b95.

Reason for revert: Fixed in oslo.serialization==5.5.0
Depends-On: https://review.opendev.org/c/openstack/requirements/+/926373

Change-Id: Ie09e230447f80b53a31bd1dad26e7f1722df2f30
2024-08-20 08:10:32 +00:00
Brian Haley
b9ca288a5d Log a warning if pid file could not be read in l3-agent
A formatting error can sometimes be seen in the l3-agent
log while spawning the state change monitor if the pid
file is empty. Log a warning to that effect instead so
an admin is aware in case there is an issue observed
with the router.

Closes-bug: #2077351
Change-Id: Ic599c2419ca204a5e10654cb4bef66e6770cbcd7
2024-08-19 13:48:55 -04:00
Rodolfo Alonso Hernandez
6168db6058 Service workers stop re-writing the process name
In a Neutron server, there are workers that are not spawned in a single
process. These processes are grouped and spawned within a service class
called ``AllServicesNeutronWorker``. This class spawns a thread per
service worker. That reduces the footprint of the Neutron server,
reducing the number of processes spawned.

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/922085

Related-Bug: #2069595
Change-Id: I24313dc891f179a600909854dd8f9a09f74088f5
2024-08-19 07:20:26 +00:00
Elvira García
1ed8609a68 Get ips from system dns resolver without scope
Currently, is_valid_ipv6 accepts ipv6 addresses with scope. However
netaddr library won't accept an address with scope. Now,
get_noscope_ipv6() can be used to avoid this situation. In a future we
will be able to use the same function which is also being defined on
oslo.utils. https://review.opendev.org/c/openstack/oslo.utils/+/925469

Closes-Bug: #2073894
Signed-off-by: Elvira García <egarciar@redhat.com>
Change-Id: I27f25f90c54d7aaa3c4a7b5317b4b8a4122e4068
2024-08-14 10:38:55 +02:00
Miguel Lavalle
f7000f3d57 Fix support of IPv6 only networks in OVN metadata agent
When an IPv6 only network is used as the sole network for a VM and
there are no other bound ports on the same network in the same chassis,
the OVN metadata agent concludes that the associated namespace is not
needed and deletes it. As a consequence, the VM cannot access the
metadata service. With this change, the namespace is preserved if there
is at least one bound port on the chassis with either IPv4 or IPv6
addresses.

Closes-Bug: #2069482

Change-Id: Ie15c3344161ad521bf10b98303c7bb730351e2d8
2024-08-13 19:25:36 -05:00
Rodolfo Alonso Hernandez
d0bcaf3f07 Bump `oslo.serialization` to version 5.5.0
This new version is required since [1]. In [2], the affected job
"neutron-ovs-rally-task" was marked as voting again but it is needed to
enforce the updated version of ``oslo.serialization``.

[1]https://review.opendev.org/c/openstack/oslo.serialization/+/926172
[2]https://review.opendev.org/c/openstack/neutron/+/926613

Change-Id: I7d7190b4a2ceb82659944c3c3f6869dfaf943b0b
2024-08-13 18:02:09 +00:00
Rodolfo Alonso Hernandez
f17cc24e8a Adopt to StandardAttribute load method change to "selectin"
Required since the Depends-On patch included, without
it postgres job fails with:-
AttributeError: 'NoneType' object has no attribute 'id'

Depends-On: https://review.opendev.org/c/openstack/neutron-lib/+/923926
Related-Bug: #2072567
Change-Id: I8f2229eb0a9d8dce927ded004037eda93ce3650d
2024-08-13 12:53:21 +00:00
ffaf021810 Temporary mark ovs-rally job as non-voting
Until the required fixes lands and release temporary
mark the job non-voting to unblock neutron gate.

Related-Issue: #2076430
Change-Id: I1044a5613e960bc24d63b7268f891abf1f223d28
2024-08-13 16:49:50 +05:30
Zuul
37b616a62d Merge "Use the RBAC actions field for "network" and "subnet"" 2024-08-07 21:50:03 +00:00
elajkat
b63442e046 Add tap_mirror to extension to OVN supported extensions
This addition is required to run a devstack setup with ovn
that includes tap_mirror extension from tap_as_a_service
see: the proposed patch [1]

[1]: https://review.opendev.org/c/openstack/tap-as-a-service/+/893509

Depends-On: https://review.opendev.org/c/893509
Depends-On: https://review.opendev.org/c/895603
Change-Id: I798c765568430c5346e9bfc81dde6470661b96c2
Related-Bug: #2015471
2024-08-07 08:36:28 +00:00
Zuul
9cbaceff20 Merge "Skip abandoning of the old patches in unmaintained branches" 2024-08-06 00:33:31 +00:00
Slawek Kaplonski
5e583d3240 Skip abandoning of the old patches in unmaintained branches
By default abandon_old_reviews.sh script will now ignore
patches from any unmaintained branches.
Cleanup of those patches can be done by passing "--unmaintained"
parameter to the script

Change-Id: If7626543f9095196ef1515039f153b16282c27a4
2024-08-04 18:52:50 +02:00
Zuul
0666008f78 Merge "Reduce to 1 thread the processing of `IpConntrackManager` events" 2024-08-02 16:04:30 +00:00
Zuul
f4ab100d88 Merge "Add dynamic lookup for tcpdump binary" 2024-08-02 11:22:26 +00:00
Zuul
394c7774da Merge "Lower spacing time of the OVN maintenance tasks which should be run once" 2024-08-02 10:37:26 +00:00
Zuul
bca71e8a30 Merge "Fix setting correct 'reside-on-chassis-redirect' in the maintenance task" 2024-07-31 21:42:10 +00:00
Zuul
4b8696d111 Merge "Initialize the policy enforcer for the "tagging" service plugin" 2024-07-31 16:48:59 +00:00
Slawek Kaplonski
04c217bcd0 Lower spacing time of the OVN maintenance tasks which should be run once
Some of the OVN maintenance tasks are expected to be run just once and
then they raise periodic.NeverAgain() to not be run anymore. Those tasks
also require to have acquried ovn db lock so that only one of the
maintenance workers really runs them.
All those tasks had set 600 seconds as a spacing time so they were run
every 600 seconds. This works fine usually but that may cause small
issue in the environments were Neutron is run in POD as k8s/openshift
application. In such case, when e.g. configuration of neutron is
updated, it may happen that first new POD with Neutron is spawned and
only once it is already running, k8s will stop old POD. Because of that
maintenance worker running in the new neutron-server POD will not
acquire lock on the OVN DB (old POD still holds the lock) and will not
run all those maintenance tasks immediately. After old POD will be
terminated, one of the new PODs will at some point acquire that lock and
then will run all those maintenance tasks but this would cause 600
seconds delay in running them.

To avoid such long waiting time to run those maintenance tasks, this
patch lowers its spacing time from 600 to just 5 seconds.
Additionally maintenance tasks which are supposed to be run only once and
only by the maintenance worker which has acquired ovn db lock will now be
stopped (periodic.NeverAgain will be raised) after 100 attempts of
run.
This will avoid running them every 5 seconds forever on the workers
which don't acquire lock on the OVN DB at all.

Closes-bug: #2074209
Change-Id: Iabb4bb427588c1a5da27a5d313f75b5bd23805b2
2024-07-31 17:07:28 +02:00
Slawek Kaplonski
4b1bfb93e3 Fix setting correct 'reside-on-chassis-redirect' in the maintenance task
Setting of the 'reside-on-chassis-redirect' was skipped for LRP ports of
the provider tenant networks in patch [1] but later patch [2] removed
this limitation from the ovn_client but not from the maintenance task.
Due to that this option wasn't updated after e.g. change of the
'enable_distributed_floating_ip' config option and connectivity to the
existing Floating IPs associated to the ports in vlan tenant networks
was broken.

This patch removes that limitation and this option is now updated for
all of the Logical_Router_Ports for vlan networks, not only for external
gateways.

[1] https://review.opendev.org/c/openstack/neutron/+/871252
[2] https://review.opendev.org/c/openstack/neutron/+/878450

Closes-bug: #2073987
Change-Id: I56e791847c8f4f3a07f543689bf22fde8160c9b7
2024-07-31 16:29:26 +02:00
Zuul
0488bdafa1 Merge "Only query for port do not get directly" 2024-07-31 08:17:55 +00:00
Zuul
7502ecf370 Merge "Start using constants from neutron-lib" 2024-07-31 07:59:52 +00:00
Zuul
169c710fc4 Merge "Do not release the executor inside `_check_child_processes`" 2024-07-30 21:50:47 +00:00
Zuul
819e1fb5b9 Merge "Use has_lock_periodic decorator for the tasks which require ovn db lock" 2024-07-30 19:56:06 +00:00
Miro Tomaska
c1b88fc5f5 Only query for port do not get directly
It was observed in the tempest tests that the port could be already
deleted by some other concurrent event when the `run` is called.
This caused a flood of exception logs. Thus, with this patch we only
query for the port and only update_router_port when the port was
found.

Closes-Bug: #2073567
Change-Id: I54d027f7cb5014d296a99029cfa0a13a7800da0a
2024-07-30 15:30:19 -04:00
Zuul
2937080d63 Merge "[OVN][CI] Update OVS_BRANCH to be compatible with ovn main" 2024-07-30 15:39:18 +00:00