Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-637

[ovn-operator] OVNController: potential race condition in vswitchd / ovsdb-server startup

XMLWordPrintable

    • Moderate

      ovs-vswitchd init.sh waits for ovs-vsctl show to succeed, then proceeds to configure db. I believe there's a race condition here because of
      the way we initialize ovsdb (by starting ovsdb-server, among other things, as part of ovs-ctl start command).

      When we start ovsdb-server, we 1) ovs-ctl start; 2) ovs-ctl stop; 3) start ovsdb-server.

      Step (1) starts ovsdb-server; (2) stops it. This is a side effect of calling ovs-ctl start. The reason we call ovs-ctl start is to initialize / upgrade db, among other things. We don't REALLY need to start ovsdb-server in (1), it's just a side effect.

      Anyway, if ovs-vsctl show command arrives in between (1) and (2), it will succeed; but then the commands that configure external-ids in ovsdb may arrive between (2) and (3) [when ovsdb-server is down], and I think in this case we may fail to configure db properly, or the vswitchd container may fail. (the latter is probably preferrable because then the next attempt to start it will retry; still not great).

              ykarel@redhat.com Yatin Karel
              ihrachys Ihar Hrachyshka
              Bharath M V Bharath M V
              rhos-dfg-networking-squad-neutron
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: