[ovs-git] [ovn-org/ovn] 85d98d: ic: call ovn_db_run() only when all DBs are connected

Vladislav Odintsov noreply at github.com
Tue Sep 7 06:24:19 UTC 2021


  Branch: refs/heads/branch-20.09
  Home:   https://github.com/ovn-org/ovn
  Commit: 85d98d15620c0871245b9887627ebf96e20450ac
      https://github.com/ovn-org/ovn/commit/85d98d15620c0871245b9887627ebf96e20450ac
  Author: Vladislav Odintsov <odivlad at gmail.com>
  Date:   2021-09-06 (Mon, 06 Sep 2021)

  Changed paths:
    M ic/ovn-ic.c

  Log Message:
  -----------
  ic: call ovn_db_run() only when all DBs are connected

Prior to this commit ovn_db_run() function in ovn-ic
was called right after daemon's lock was acquired in SB DB.

Inside ovn_db_run() there is a search for availability zone
in NB DB. If AZ was not found, ovn_db_run returned. So, it was
an implicit requirement for connected NB DB.

But in case, where NB DB was connected and ICNB DB was not,
we could run in situation where in ts_run() logical switches
from NB DB were collected and transit switches from ICNB DB
were not due to not synced ICNB DB. This lead to deletion of
transit logical switches from NB DB.

A normal restart of only one ovn-ic daemon in AZ, could damage
the logical topology: it removed LS (transit), its LSPs.
After ovn-ic is connected to ICNB, it creates logical switch
in NB DB back, but its LSPs are lost and need manual re-addition.

This commit adds explicit requirement for all DBs to be
connected:

- NB DB
- SB DB
- ICNB DB
- ICSB DB

Only when this condition is met, we can safely run ovn-ic sync
logic.

Signed-off-by: Vladislav Odintsov <odivlad at gmail.com>
Signed-off-by: Han Zhou <hzhou at ovn.org>




More information about the git mailing list