Skip to content

Conversation

github-actions[bot]
Copy link

This PR contains a snapshot of yoga from upstream.

fernandoroyosanchez and others added 7 commits November 15, 2022 13:48
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)
@github-actions github-actions bot requested a review from a team as a code owner November 28, 2022 08:24
@github-actions github-actions bot added automated Automated action performed by GitHub Actions synchronisation labels Nov 28, 2022
mnasiadka
mnasiadka previously approved these changes Nov 28, 2022
@mnasiadka mnasiadka merged commit 0114942 into stackhpc/yoga Nov 28, 2022
@mnasiadka mnasiadka deleted the upstream/yoga-2022-11-28 branch November 28, 2022 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Automated action performed by GitHub Actions synchronisation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants