In some fullstack tests it is expected that agent is DOWN in the Neutron
DB. It could happen sometimes that in almost the same time test's client
was doing GET /v2.0/agents/{agent_id} call and got result with
"alive=False" and in other thread rpc worker was processing heartbeat
from the agent so it was revived just after API request was finished.
That was causing test failures in some cases.
This patch adds second API call to get agent again after 2 seconds if it
was already marked as DEAD, just to make sure that it is really dead ;)
Closes-Bug: #2045757
Change-Id: I1c20c90b8abd760f3a53b24024f19ef2bd189b5a
It's not necessary to get all port informations for the
floating IP port DB query. And the device_id and
device_owner is unique for the DB query.
Change-Id: If7ed1d1b1d9798c0df676bc8c452fb0fa9e288d1
If the callback method ``OVNMechanismDriver.post_fork_initialize``
fails, the callback manager must raise an exception and finish the
process. If that happens in a Neutron worker, the
``oslo_service.service.Services`` class will restart the process.
The neutron-lib version is bumped to 3.9.0. It contains [1], needed
for this patch.
[1]https://review.opendev.org/c/openstack/neutron-lib/+/895940
Partial-Bug: #2036607
Change-Id: I2aca9a522bda2d69962369748b70fa9270fbe245
Refactor import statements to be like most others
in the tree. Functionality unchanged.
TrivialFix
Change-Id: I74995505d5857f473918587b84a07e986e02ba60
test_clear_ip_rate_limit() was not properly testing
the TC code, relying on the return value (of None)
to be success. Call get_filter_id_for_ip() to verify
the limit has been removed (will trigger exception).
The other flat driver case just re-factored the code
to remove the warning.
TrivialFix
Change-Id: Ie4d5a4b96202bce5541ced241975cfdf2bf19aaa
Fix useless-else-on-loop, no-else-raise warnings and
no-else-continue in some test files. Noticed while
making another change.
TrivialFix
Change-Id: I9f3100ab2fe97275906e52a764a5023039622728
test_delete_unmoved_global() was using a long-ago
deprecated method failUnlessRaises, just use
assertRaises.
TrivialFix
Change-Id: I8f3cc84a186de0e2a58b696ce7805dbc42ba7c98
Both metadata agents (OVN and non-OVN) should handle
process exceptions when spawning haproxy processes
such that the agent can continue its operation for
other haproxy processes.
Closes-Bug: #2033305
Change-Id: I6da1b135c83ecfc41ec91e907ebf8500325a7a80
TODO says this was introduced in Q and can be
removed in U, so let's do it.
Removed the DB sync as well.
Removed the related OVSDB code to get and delete
address sets as these were the only callers
according to codesearch.
Change-Id: I13dfce7a8f6a5cb9ec91d548242bedce785f8340