On Wed, May 23, 2018 at 1:08 PM, Ben Pfaff <[email protected]> wrote: > > On Sat, May 19, 2018 at 02:23:22PM -0700, Han Zhou wrote: > > This case fails occasionally because although it waits until port > > binding is completed on HV, the patch port creation may not be > > completed yet on HV for the localnet port, so if the packets are sent > > out at this moment, the case will fail. This patch ensures patch > > port is created and then do another sync before sending the packet > > so that the ovn-controller is given a chance to handle the change > > and install related flows to OVS. > > > > Signed-off-by: Han Zhou <[email protected]> > > It sounds to me like this is actually a bug in ovn-controller: it should > not report that it is up-to-date until the patch port creation has > completed. There is a mechanism to find out that this is complete, and > ovn-controller should use it. The outline of how it would be done is > something like this: > > * When ovn-controller commits a change to the OVS database, it > should also increment the next_cfg column in the Open_vSwitch > table. ovs-vsctl does this, with: > > ovsdb_idl_txn_increment(txn, &ovs->header_, > &ovsrec_open_vswitch_col_next_cfg, false); > > * Before ovn-controller updates nb_cfg, it waits until cur_cfg in > the Open_vSwitch table reaches at least the next_cfg that it set.
Thanks for pointing out! I didn't notice that Open_vSwitch has same mechanism as OVN DBs. I will submit a new patc! later. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
