With northd incremental processing, when Port_Binding.up is cleared
manually, e.g. in test case "testing propagate Port_Binding.up to NB and
OVS", the change is ignored, and the test case failed.

This patch fixes it by resetting the value to "false" in the
en_sync_from_sb node.

Note: alternatively we may modify the test case, because this is not a
real problem in production, but the fix in code is simple without
obvious side-effect, so just kept the test case and handled it in the
code.

Fixes: b41d74fcb382 ("northd: Ignore "up" column change if ignore_lsp_down is 
true.")
Reported-by: Dumitru Ceara <dce...@redhat.com>
Signed-off-by: Han Zhou <hz...@ovn.org>
---
 northd/northd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/northd/northd.c b/northd/northd.c
index 2aad2e425a00..6a5c02c7a08c 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -17602,6 +17602,14 @@ handle_port_binding_changes(struct ovsdb_idl_txn 
*ovnsb_txn,
             nbrec_logical_switch_port_set_up(op->nbsp, &up, 1);
         }
 
+        /* ovn-controller will update 'Port_Binding.up' only if it was
+         * explicitly set to 'false'.
+         */
+        if (!op->sb->n_up) {
+            up = false;
+            sbrec_port_binding_set_up(op->sb, &up, 1);
+        }
+
         if (build_ha_chassis_ref && ovnsb_txn && sb->chassis) {
             /* Check and add the chassis which has claimed this 'sb'
              * to the ha chassis group's ref_chassis if required. */
-- 
2.30.2

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to