50eee19723
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. Closes-Bug: #1991579 Co-Authored-By: Terry Wilson <twilson@redhat.com> Change-Id: I27af495f96a3ea88dd31345dbfb55f1be8faabd6 |
||
---|---|---|
.. | ||
test_utils.py |