Commit Graph

28150 Commits

Author SHA1 Message Date
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
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
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
Zuul dcfe7c4a4d Merge "Rename create_flows_for_ip_address to reflect it accepts (ip, mac)" 2024-05-20 11:27:06 +00:00
Zuul 527e712a18 Merge "Increase code coverage for ip_lib sysctl()" 2024-05-20 09:44:29 +00:00
Zuul d11cda46b0 Merge "Remove and modify outdated options in DHCP HA documentation" 2024-05-17 18:21:47 +00:00
Zuul bd11b838ff Merge "Increase code coverage for cidr_broadcast_address_alternative()" 2024-05-17 18:12:43 +00:00
Zuul dac655c643 Merge "Increase code coverage for floating_mangle_rules()" 2024-05-17 18:12:39 +00:00
Zuul ad18963e04 Merge "Update the OVN manual install doc" 2024-05-17 18:12:33 +00:00
Zuul 31427e7432 Merge "Increase code coverage for plugin _get_network_mtu()" 2024-05-17 18:12:30 +00:00
LIU Yulong 80577381d9 Bump port revision if binding_levels changed
Related-Bug: #2065577
Change-Id: I0d04c3a1dae86a2b6b4ba70c0e9595b2527b4f71
2024-05-17 11:43:53 +08:00
Zuul cb78c7e973 Merge "Add pre-commit configuration" 2024-05-16 17:49:38 +00:00
Zuul f785038c3c Merge "Fix trailing whitespaces and replace tabs with 4 spaces" 2024-05-16 16:09:35 +00:00
Zuul 6c5a052ac0 Merge "Put monitors dictionary back in MetadataDriverBase class" 2024-05-16 01:32:41 +00:00
Zuul 2fc5f37669 Merge "Increase code coverage for OVN SG update" 2024-05-15 22:03:31 +00:00
Ihar Hrachyshka d040a38f49 Rename create_flows_for_ip_address to reflect it accepts (ip, mac)
The semantics changed since I2e3aa7c400d7bb17cc117b65faaa160b41013dde
but the name was not updated.

This patch also revealed a number of issues in unit tests where
mock flow_states were using the old key format (bare ip) instead of the
new (ip, mac) tuple. These are also now fixed.

Change-Id: Ic96b5ce6576c31075602e0f033fd74acbae333ee
2024-05-15 15:10:39 +00:00
Takashi Kajinami 11255ede97 Fix the broken neutron gate
There are currently two issues affecting the neutron gate, one
for pep8 job and the other for fullstack. We need to fix them
both together since they cannot merge separately.

Bump pylint to the latest version to fix pep8 job - it was
pinned to an old version which is causing the job to hang.

Do not use str(url) to stringify a URL for subsequent use
to fix  the fullstack job. The str(url) function in SQLAlchemy
hides the password. For a URL string that is to be re-used, use
render_as_string(hide_password=False).

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>

Closes-Bug: #2065779
Change-Id: I8d04db91ddc2995fbff05b4c4c48baebcc418522
2024-05-15 16:13:38 +02:00
Zuul 35daa2d868 Merge "Optimize deletion of static routes" 2024-05-13 12:11:58 +00:00
Ihtisham ul Haq 305153883b Optimize deletion of static routes
Instead of having a separate OVN command for deletion of each
static route, send out the deletion as a single command.

Which significantly improves the performance. Previously
deletion of 1000 routes took >1m30s and >6m30s for 2000 routes,
with this change it takes ~5s and ~8s, respectivily.

Closes-Bug: #2060054
Change-Id: Iaa5204e2e48795c31c502160041bd128189eef5a
2024-05-12 18:21:30 +02:00
Brian Haley 5b62e27154 Put monitors dictionary back in MetadataDriverBase class
When the common Metadata Driver was created in [0], the
monitors dictionary was dropped accidentally. This causes
tracebacks in the fullstack L3-HA tests when
after_router_updated() is called. Put it back along with
its related tests.

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

Closes-bug: #2065145
Change-Id: I137ed7cec9e0eafdb3a351e5a414f5a0c16f33e5
2024-05-08 17:31:55 -04:00
Ihar Hrachyshka a3d0fb6673 tests: Don't use neutron object where db model is expected
Change-Id: I5f99153c105e7f86638356a75a955504ed42e288
2024-05-07 22:16:18 -04:00
Jakub Libosvar 5795c192b8 Don't update revision number if object was not modified
If there were not changes made to data in the database there is no
reason to bump revision numbers because the underlying drivers won't
change too. This saves cycles in case empty updates are incoming to the
API.

Co-Authored-By: Ihar Hrachyshka <ihar@redhat.com>

Closes-bug: #2065094
Change-Id: Ib74fdab7a8927ef9cc24ef7810e9cf2c264941eb
2024-05-07 22:16:14 -04:00
Slawek Kaplonski cdb644574a Remove info about QoS and L3 meetings from the contributing guide
We don't have those meetings anymore.

Change-Id: I9957124609114540812b0141b09cd41026801f03
2024-05-06 08:50:25 +02:00
Zuul 7f56084c88 Merge "Start trunk plugin RPC via service framework" 2024-05-03 01:49:43 +00:00
Slawek Kaplonski af7c98a908 Add pre-commit configuration
'pre-commit' tool [1] provides an extensible way to configure hooks
which can be run automatically before each commit. That way we can make
sure that code send to review is passing base static analysis checks
like e.g. bandit, flake8 or hacking.

For now this is optional to use and not integrated in e.g. tox.ini file
but we can integrate it there too as next step.

[1] https://pre-commit.com/

Change-Id: Ia3bc21ccacacbcb8a529163533557312cbbf25bd
2024-05-02 10:46:27 +00:00