Since [0] ovn-ic uses a dual IC-SB connection, which means ovn-ic is
notified through the locked and the unlocked idl connection.
Before adding a new datapath binding, ovn-ic checks whether the datapath
binding is not yet in ISB.
However, it was using the unlocked idl for this, while the Datapath Binding
is added with the locked one. Hence, there is a time window where the
datapath binding has already been added, the locked and unlocked txn are
available, the datapath binding is visible in the locked idl, but not yet
in the unlocked idl. This resulted in ovn-ic trying to insert again the
same datapath binding, which results in a transaction error.
This was highlighted by random failures of test [1].
[0] 052a298bb90e ("ovn-ic: Use dual IC-SB connections to prevent constraint
violations.")
[1] ovn-ic -- Add transit router remote port - race condition
Fixes: 052a298bb90e ("ovn-ic: Use dual IC-SB connections to prevent constraint
violations.")
Signed-off-by: Xavier Simonart <[email protected]>
---
ic/ovn-ic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
index 5c8211c1a..1a8783299 100644
--- a/ic/ovn-ic.c
+++ b/ic/ovn-ic.c
@@ -196,7 +196,7 @@ enumerate_datapaths(struct ic_context *ctx, struct hmap
*dp_tnlids,
struct shash *isb_ts_dps, struct shash *isb_tr_dps)
{
const struct icsbrec_datapath_binding *isb_dp;
- ICSBREC_DATAPATH_BINDING_FOR_EACH (isb_dp, ctx->ovnisb_unlocked_idl) {
+ ICSBREC_DATAPATH_BINDING_FOR_EACH (isb_dp, ctx->ovnisb_idl) {
ovn_add_tnlid(dp_tnlids, isb_dp->tunnel_key);
enum ic_datapath_type dp_type = ic_dp_get_type(isb_dp);
--
2.47.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev