Hi, I was debugging a strange behaviour of ovn-controller-vtep daemon and need some assistance about how ovsdb transactions and in-memory objects work.
ovn-controller-vtep, when a new vlan binding appears tries to commit in SB DB type=vtep Port_Binding "chassis" column value [0]. Based on the chassis column existence it commits tunnel_key value: port_binding->datapath->tunnel_key if chassis exists [1], 0 otherwise [2]. I see that during the main loop iteration, where ovn-controller-vtep tries to set chassis to port_binding, this port_binding is modified in memory and functions, which run after this setting in same main loop iteration, work with a modified port-binding object, which was not yet committed and which was not yet acknowledged by SBDB. This triggers ovn-controller-vtep to set vtep lswitch tunnel_key column to appropriate value (non-zero). On the next iteration I see that this port-binding object returns to previous state (actual to DB contents — no chassis in port binding) and ovn-controller-vtep resets vtep lswitch tunnel_key to 0. After SB DB responses with an update to last transation with an update3 method, which contains a change for port_binding: set chassis. Now ovn-controller-vtep again sets tunnel_key for vtep logical-switch to non-zero value. Is it an expected behaviour? How to avoid such flapping? 0: https://github.com/ovn-org/ovn/blob/v21.12.0/controller-vtep/binding.c#L113 1: https://github.com/ovn-org/ovn/blob/v21.12.0/controller-vtep/vtep.c#L241 2: https://github.com/ovn-org/ovn/blob/v21.12.0/controller-vtep/vtep.c#L261 Regards, Vladislav Odintsov _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
