forked from openstack/neutron
-
Notifications
You must be signed in to change notification settings - Fork 2
Synchronise yoga with upstream #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When simultaneous attempts are made to add an interface to the same router including overlapping networks in cidrs, both attempts are successful. There is a check to avoid this overlap but is performed when creating the network interface and it is done over the ports already attached to the router, so at this moment the check is not able to detect the overlapping. Furthermore, the create_port operation over the ML2 plugin must be executed in isolated transactions, so trying to control the execution context or adding additional steps to the transaction is not feasible. This patch checks once the RouterPort is created on the neutron database if there is more than one overlapping port, triggering in that case the exception that will remove the the culprit of overlapping. Conflicts: neutron/db/l3_db.py (manually cherry picked from commit 1abb77d) Closes-Bug: #1987666 Change-Id: I7cec8b53e72e7abf34012906e6adfecf079525af (cherry picked from commit 1abb77d)
Nothing much else, what the title says... Change-Id: Ib1d41a6e4c869e108f31c1eb604f22c794d66467 Closes-Bug: #1996759 Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com> (cherry picked from commit bf44e70)
Continue similar approach following in [1], where some project imports collide with config options. As part of the change, a wrapped decorator has been implemented to cover those functions that include any of the ovn config options as value to the decorators arguments (e.g. tenacity retry). This way we avoid requiring the options to be registered as soon as the module is imported, where they have not yet been registered by a main process. [1] https://review.opendev.org/c/openstack/neutron/+/837392 Co-authored-by: Jakub Libosvar <libosvar@redhat.com> Co-authored-by: Fernando Royo <froyo@redhat.com> Conflicts: neutron/agent/ovn/metadata_agent.py neutron/cmd/ovn/neutron_ovn_db_sync_util.py neutron/common/ovn/utils.py neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py Change-Id: I4bccb094ee7f690cbc352c38b5b39d505e6ea460 (cherry picked from commit 227c5f8)
Previously we used short living OVN database connection to create neutron_pg_drop Port Group before workers were spawned. The pre_fork_initialize actually happens after the api workers are spawned anyways and it blocks spawning of other workers, such as maintenance, rpc or periodic. If the OVN database was large it may take several minutes to connect to the database at scale and this blocks spawning of other workers. That means connecting to OVN in pre_fork is not a good idea. This patch replaces the mechanism by using ovsdb-client to send a transaction without connecting to the database and downloading the whole content. The command does following, everything is on the server side: 1) With timeout 0 it waits for neutron_pg_drop Port Group. If the PG is present, the transaction finishes and nothing happens. 2) If the PG is not present, it times out immediately and commits new entries that effectivelly creates neutron_pg_drop Port Group with implicit ACLs to block ingress and egress traffic. Conflicts: neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py Closes-Bug: #1991579 Co-Authored-By: Terry Wilson <twilson@redhat.com> Change-Id: I27af495f96a3ea88dd31345dbfb55f1be8faabd6 (cherry picked from commit 50eee19) (cherry picked from commit 5deea00)
mnasiadka
previously approved these changes
Nov 28, 2022
bbezak
approved these changes
Nov 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a snapshot of yoga from upstream.