Commit Graph

28173 Commits

Author SHA1 Message Date
Zuul abe8110f53 Merge "Revert "Use HasStandardAttributes as parent class for Tags DB model"" 2024-06-12 10:26:05 +00:00
Zuul 939f86f027 Merge "Remove old excludes" 2024-06-12 00:09:39 +00:00
Zuul efe7930dd0 Merge "[OVN] Bump revision number after update_virtual_port_host" 2024-06-11 22:09:58 +00:00
Zuul 25608f2165 Merge "Bump neutron-lib to 3.13.0" 2024-06-11 18:04:21 +00:00
Zuul 319489cc8f Merge "[OVN] Fix virtual parent match for PortBindingUpdateVirtualPortsEvent" 2024-06-11 18:04:11 +00:00
Miro Tomaska bf123dfb38 Revert "Use HasStandardAttributes as parent class for Tags DB model"
This reverts commit 85d3fff97e.

Reason for revert:
The original change was made as a “cheap win” to optimize the number
of queries the neutron server makes during testing. This did
improve the number of queries made but introduced regression in
real world deployments where some customers(through automation)
would define hundreds of tags per port across a large deployment.
I am proposing to revert this change in favor of the old “subquery”
relation in order to fix this regression. In addition, I filed the
Related-Bug #2069061 to investigate using `selectin` as the more
appropriate long term solution.

Change-Id: I83ec349e49e1f343da8996cab149d76443120873
Closes-Bug: #2068761
Related-Bug: #2069061
2024-06-11 11:10:18 -04:00
Fernando Royo f210a90479 [OVN] Bump revision number after update_virtual_port_host
This patch adds bump revision after updating the hostname
of a virtual port (more specifically its associated port).
This way there is no misalignment between the revision number
of Neutron DB and OVN DB.

It also avoids the unnecessary execution of the maintenance
task to simply match the revision_number.

Closes-Bug: #2069046
Change-Id: I2734984f10341ab97ebbdee11389d214bb1150f3
2024-06-11 14:22:18 +02:00
Zuul 22aa83fa3b Merge "Fix trunk test_subport_delete functional test" 2024-06-11 07:28:16 +00:00
Zuul 267b3d4805 Merge "[eventlet] Bump eventlet version to 0.36.1" 2024-06-10 20:28:14 +00:00
Michel Nederlof 170d99f2d5 [OVN] Fix virtual parent match for PortBindingUpdateVirtualPortsEvent
As mentioned in change [1], the condition should be a `is None` as per inline comment.

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

Related-Bug: #2038413
Change-Id: I3666cf0509747863ca2a416c8bfc065582573734
2024-06-10 15:39:26 +02:00
Rodolfo Alonso Hernandez 9e7cc782e6 [eventlet] Bump eventlet version to 0.36.1
This version should allow to run asyncio and eventlet applications in
the same thread.

Change-Id: I413327a5e3cbfc13ccd9cc0f7480073cbf7b2b36
2024-06-10 06:51:05 +00:00
Brian Haley a8b6080cdf Bump neutron-lib to 3.13.0
Will allow neutron to start using 'selectin' DB load
strategy and addresses some issues with netaddr library
related code.

Depends-on: https://review.opendev.org/c/openstack/requirements/+/921518
Change-Id: I1f4c3af87a2c997dbfb003e2d276df20fdf1d0d5
2024-06-07 10:34:35 -04:00
Slawek Kaplonski 6af25b2588 Add policy for create_agent api call
Creation of agents is not really supported and returns BadRequest
exception when called but without default policy for that call
oslo_policy module was using default rule for it and that default one is
'admin_or_owner' which is not correct in case of agent resource as it
don't belongs to any tenant so don't have owner.

Additionally it seems that BadRequest exception raised by the
create_agent method was missing resource and msg parameters so this
patch added them too.

Related-Bug: #2022043
Change-Id: I3beb3f2ee2f4717b80c5422a2d3db8e93d322a1c
2024-06-07 15:39:35 +02:00
Miguel Lavalle 784e737295 Fix trunk test_subport_delete functional test
This change fixes a race condition between deleting a subport in the
trunk plugin and the actual deletion in the OVN NBDB.

Change-Id: I836d47a1879d474c2171905416a2838cfe3bab5a
Closes-Bug: #2067400
2024-06-06 19:46:20 -05:00
Zuul ebed620aaf Merge "Bump oslo.service to 3.5.0" 2024-06-06 21:19:43 +00:00
Brian Haley 11027e3e1e Fix regex lines in zuul.d/* files
Commit 260c968118 broke the gate by causing jobs
to not get run when it added RE2 compatibility for
irrelevant-files. Digging found that RE2 doesn't
support negative lookahead (and won't ever), so it's
impossible to replace the previous pcre filter with a
similar RE2 filter.

Instead of reverting to the original filter, which
is considered obsolete by zuul, this patch fixes the
issue by explicitly listing all files under zuul.d/
except the one that we actually want to trigger the
jobs: zuul.d/project.yaml.

Listing all the files in the directory for every job
is not ideal, and we may revisit it later, or perhaps
even reconsider the extensive use of irrelevant-files
in the neutron tree. This will have to wait for when
the gate is in better shape though.

[0] https://github.com/google/re2/issues/156

Related-bug: #2065821
Change-Id: I3bba89ac14414c6b7d375072ae92d2e0b5497736
2024-06-06 11:37:52 +05:30
yatinkarel eaca8a360f Add some swap to tox-cover job
As mentioned in the related bug we are seeing
hign memory usage in the job since sqlalchemy
bump to 2.0 and this leads to gate instability.
Adding some swap to handle this until the issue
is fixed.

Also reverts the concurrency reduction change[1]
that was done for this issue as that shouldn't be
needed now.

[1] https://review.opendev.org/c/openstack/neutron/+/920766
Related-Bug: #2065821

Change-Id: I33c4869c1d5230c0c8cc2f0dd4f6d071600bf220
2024-06-06 11:13:54 +05:30
Zuul 4769811451 Merge "Make openstack-tox-py311-with-sqlalchemy-master non-voting" 2024-06-04 12:18:48 +00:00
Zuul bee9bde182 Merge "Add a default goto table=94 for openvswitch fw" 2024-06-04 05:36:55 +00:00
Ihar Hrachyshka 768d20f285 Bump oslo.service to 3.5.0
This is to include Ief3ab2f56fa3d805296709e12e5f7a71560f7b6e that is
needed by I730a12746bceaa744c658854e38439420efc4629.

Related-Bug: #2056366

Change-Id: I8a21c96e18df89301e5f1eeab51c4026e2635de9
2024-06-03 17:03:38 -04:00
Zuul 42ea2b28e1 Merge "Use RE2 compatible regex for irrelevant-files" 2024-06-03 18:50:52 +00:00
Zuul 9b89f51852 Merge "Bump neutron-lib to 3.12.0" 2024-06-03 09:39:47 +00:00
yatinkarel 260c968118 Use RE2 compatible regex for irrelevant-files
Zuul has deprecated the usage of negative regex[1] and
reports WARNINGs when these are used.
This patch switches the branches regex to the supported
one.

[1] https://review.opendev.org/c/zuul/zuul/+/916141

Change-Id: I56a286cf33afb574436039128095e260539f63d9
2024-06-03 12:08:20 +05:30
Zuul 0397b307c2 Merge "Increase code coverage for safe_configure_dhcp_for_network()" 2024-06-03 06:10:02 +00:00
Zuul c62ca18e41 Merge "reno: ml2/ovn allows to create/delete trunks for bound ports" 2024-06-02 18:41:52 +00:00
Zuul 5554613d53 Merge "Revert "[OVN] Prevent Trunk creation/deletion with parent port bound"" 2024-06-02 11:44:16 +00:00
Zuul 2f351d9e64 Merge "tests: Don't except error 400 from allocation_pools=None" 2024-06-02 09:48:32 +00:00
Ihar Hrachyshka a508ce3913 reno: ml2/ovn allows to create/delete trunks for bound ports
Related-Bug: #2065707
Change-Id: I3db28c5b289aefd78055416db972d71352307302
2024-05-31 15:39:39 +00:00
Ihar Hrachyshka ac15191f88 Revert "[OVN] Prevent Trunk creation/deletion with parent port bound"
There are three reasons to revert this patch.

1. It broke RPC push API for trunks because it added port db model to
   event payload that is not serializeable.

2. It also broke the callback event payload interface, which requires
   that all entries in .states attribute belong to the same core object.

To quote from neutron-lib,

```
 # an iterable of states for the resource from the newest to the oldest
 # for example db states or api request/response
 # the actual object type for states will vary depending on event caller
 self.states = ...
```

3. There is no good justification why ml2/ovn would not allow this
   operation. The rationale for the original patch was to align the
   behavior with ml2/ovs, but we don't such parity requirements. The 409
   error that can be returned by the API endpoints is backend specific.

To quote api-ref,

```
409 The operation returns this error code for one of these reasons:
    A system configuration prevents the operation from succeeding.
```

AFAIU there is nothing that prevents ml2/ovn to create a trunk in this
situation.

This will have to be backported in all supported branches (the original
patch was backported down to Wallaby).

Conflicts:
	neutron/services/trunk/drivers/ovn/trunk_driver.py

This reverts commit 833a6d82cd.

Closes-Bug: #2065707
Related-Bug: #2022059
Change-Id: I067c2f7286b2684b67b4389ca085d06a93f856ce
2024-05-31 15:39:25 +00:00
Ihar Hrachyshka fe7276ecd8 tests: Don't except error 400 from allocation_pools=None
A recent change in neutron-lib [1] changed the behavior somewhat,
handling the None value explicitly passed as `allocation_pools` the same
way as if the field was not passed at all (meaning, setting pools from
start/end IP addresses for the subnet.)

This new behavior seems reasonable, so instead of reverting to the
original behavior, I'm making the test cases here not check an error
happens when None is passed.

[1] If768ab6a5f92d200841a734087bbc8fba8870dc6

Change-Id: I938ffabe7e74fa129c58dd4786153a0b4f374194
2024-05-31 11:25:08 -04:00
Ihar Hrachyshka fd7ebe2960 Make openstack-tox-py311-with-sqlalchemy-master non-voting
The job can be affected by any patch landed in neutron-lib; the latter
repo doesn't run the job at all though.

We can add the job to neutron-lib check pipeline too (see bug referred
below), but more generally, we shouldn't gate on unreleased libraries.

The job is still extremely useful, but as advisory signal to anticipate
upcoming breakages.

Related-Bug: #2067515
Change-Id: Ia0be288b794b11659a5c98e4bd7c12a97c958926
2024-05-31 11:20:02 -04:00
Zuul a8ca0930a7 Merge "Rename delete_flow_for_ip -> delete_flow_for_ip_and_mac" 2024-05-30 21:28:50 +00:00
Brian Haley 5a1e9826c2 Temporarily add '--concurrency 4' to coverage job
Add '--concurrency 4' when running coverage job as it
helps work around an OOM killer issue we are seeing in
the gate. It typically only adds between 10 and 30
minutes to job. Can revert once issue is resolved.

Partial-bug: #2065821
Change-Id: I33aea3a3c884877573d4d45c6e07955bb177c766
2024-05-29 13:41:04 -04:00
Zuul 06c1972a48 Merge "Return both project_id when validating auto allocate network" 2024-05-24 09:31:16 +00:00
Zuul 0534f5dea7 Merge "Do not fail on missing logical router ports" 2024-05-23 04:00:40 +00:00
Zuul 2718a7da47 Merge "Bump port revision if binding_levels changed" 2024-05-22 23:33:39 +00:00
Zuul 147dc93eff Merge "tests: Use `del_fake_chassis` when deleting a chassis" 2024-05-22 22:19:40 +00:00
Slawek Kaplonski dfc01beab2 Return both project_id when validating auto allocate network
When neutron API is called to check requirements for the auto_allocate
topology, it needs to return not only 'tenant_id' field but also
'project_id' as that is required for the policy enforcement.
Without this 'project_id' field requirements check was failing for
member and reader users as they got 404 from the Neutron API. And the
reason why Neutron was returning 404 was that it wasn't passing policy
enforcement due to missing project_id field in the 'target' object.

Closes-bug: #2066369
Change-Id: Idf96a82bc6c8cb0b47dfde3baba94b42a8a8beba
2024-05-22 15:28:05 +02:00
Ihar Hrachyshka 60167cbb6e tests: Use `del_fake_chassis` when deleting a chassis
This will guarantee that regardless of ovsdbapp version, Chassis_Private
will be deleted. This allows us to wait for a single event (DELETE) and
test the same behavior for all ovsdbapp versions. (Behavior of agent
listing when both Chassis and Chassis_Private records are deleted from
ovn db.)

Depends-On: https://review.opendev.org/c/openstack/requirements/+/920062
Change-Id: I0dfa21a927067afb532d7632f7e05427623327f5
2024-05-22 05:40:01 +00:00
yatinkarel 7967627035 Do not fail on missing logical router ports
set_gateway_mtu runs for all the gateway ports for a network
and if one of the ports get's deleted in meanwhile
whole transaction fails. Added if_exists=True so the
transaction do not fail for such deleted ports.

Also update minimal version of "ovsdbapp" required for
this.

Depends-On: https://review.opendev.org/c/openstack/ovsdbapp/+/919696
Depends-On: https://review.opendev.org/c/openstack/requirements/+/920062
Closes-Bug: #2065701
Related-Bug: #2060163
Change-Id: Ie0ce420414f1e6056d9df2733b7446d02c89fcfc
2024-05-22 09:17:07 +05:30
Zuul c89b50c639 Merge "Remove the Windows OS libraries" 2024-05-21 19:40:11 +00:00
Zuul 1bb01f0095 Merge "[functional tests] compatibility with ovsdbapp>=2.7.0" 2024-05-21 18:22:45 +00:00
Takashi Kajinami 5cbba634ca Remove old excludes
These are detected as errors since the clean up was done[1] in
the requirements repository.

[1] 314734e938f107cbd5ebcc7af4d9167c11347406

Change-Id: I619d4663cc4a46729c6e169b85071f27bb73e993
2024-05-21 13:17:36 -04:00
yatinkarel 20b9893e34 [functional tests] compatibility with ovsdbapp>=2.7.0
ovsdbapp>=2.7.0 handles cleanup of Chassis_Private record
with chassis delete so we don't need explicit delete.
The compatibility part can be dropped when we update
requirements.txt to ovsdbapp>=2.7.0.

Closes-Bug: #2066263
Change-Id: I45c6e6a1c3536cf4f2d90b01a3577eec9eaf3743
2024-05-21 14:31:36 +00:00
yatinkarel 2beb20f92b Update grenade_from_branch for skip level jobs
Skip level jobs were wrongly upgrading from stable/2023.1.
As master is currently 2024.2, upgrade from branch should
be 2023.2, this patch fixes it.

Related-Bug: #2066221
Change-Id: I568ebb93bc009951ca113a09ee750982f580b40d
2024-05-21 11:49:47 +05:30
Brian Haley 33d3d9d936 Bump neutron-lib to 3.12.0
At a minimum this should fix the undefined rule check seen
running the pep8 job, something like this:

  .../neutron/.tox/pep8/lib/python3.10/site-packages/neutron_lib/
     db/model_base.py:119: MovedIn20Warning: Deprecated API features
     detected! These feature(s) are not compatible with SQLAlchemy 2.0.

Depends-on: https://review.opendev.org/c/openstack/requirements/+/919836

Change-Id: I637c377ab639ff49a75fbf4b926464464d888c44
2024-05-20 15:09:00 -04:00
Ihar Hrachyshka 639a8bae85 Rename delete_flow_for_ip -> delete_flow_for_ip_and_mac
This reflects the input to the function.

Change-Id: I560ac6701b6c97d4870b77781c9b9dd9f1361396
2024-05-20 12:16:42 -04:00
Zuul e0442afa9b Merge "Remove the restriction on empty cidr's update events" 2024-05-20 11:45:15 +00:00
Zuul 5bec5c54ac Merge "Remove string support in install_instructions" 2024-05-20 11:45:11 +00:00
Zuul 2cb47b2a36 Merge "Make common Metadata Proxy classes" 2024-05-20 11:27:11 +00:00