forked from ovn-org/ovn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Fix multiple ovn-ic race conditions.
Multiple ovn-ic tests were failing flakily in the following cases: - There are two availability zones (az1 & az2) - Ports and routes are added in az2 ovn_as az2 ovn-nbctl lrp-add lr.. lrp.. ovn_as az2 ovn-nbctl lr-route-add ... - We run check ovn-ic-nbctl --wait=sb sync - We expect route to be learned on az1 (ovn_as az1 ovn-nbctl lr-route-list ...). We have a few race conditions: A) The wait=sb sync wait for the seq_nb to be written in ic-nb, read by az1/ovn-ic and az2/ovn-ic, which both update their az/seq_nb. When both are updated, one az/ovn-ic updates ic-sb/seq_nb. There is no check on az2/sb. If az2/sb is slow, ovn-ic-nbctl --wait=sb sync (and as az1 ovn-nbctl lr-route-list) might be completed before the route update is notified to ic-sb and learned by az1. -> This can be avoided/fixed by 1) Adding ovn-nbctl --wait=sb in ovn-nbctl lrp-add 2) Implementing a ovn-ic-nbctl --wait=hv sync which would go until az/sb. This is not really necessary here as [1] is fine. B) When ovn-nbctl lrp-add lr12 returns, it's in az2/nb (i.e. a new LRP in az2/nb) - After ovn-ic-nbctl --wait=sb sync, if az1/ovn-ic runs first: az1/ic write az1/seq_nb in ic/sb Next time az2/ovn-ic runs (when handling ovn-ic-nbctl --wait=sb sync), it reads the route related info and writes in (as well as seq_nb) in ic-sb ovn-ic-nbctl --wait=sb sync returns, but route related info is only in ic/sb. No guarantee it has been handled by az1/ovn-ic. -> This can be handled/fixed by 3) Calling twice wait=sb sync 4) Implementing a ovn-ic-nbctl --wait=sb sync making sure an update from one az is handled by the other az (implementing [3]). [4] is not really necessary here as [3] is fine. Signed-off-by: Xavier Simonart <[email protected]> Acked-by: Mark Michelson <[email protected]> Signed-off-by: Mark Michelson <[email protected]>
- Loading branch information
1 parent
39030ed
commit d81738a
Showing
1 changed file
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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