From: Numan Siddique <[email protected]>

When a container logical port's parent changes and if the parent logical
port resides in the same chassis as the old parent, ovn-controller doesn't
track that change in the 'tracked_dp_bindings'.  At present this is not
an issue because pflow_output engine handles this in the port_binding
change handler.  However, it is better to track this in the
runtime_data.

Signed-off-by: Numan Siddique <[email protected]>
---
 controller/binding.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/controller/binding.c b/controller/binding.c
index 585f0271e..395450c3e 100644
--- a/controller/binding.c
+++ b/controller/binding.c
@@ -1228,6 +1228,15 @@ consider_container_lport(const struct sbrec_port_binding 
*pb,
     }
 
     struct shash *binding_lports = &b_ctx_out->lbinding_data->lports;
+    struct binding_lport *b_lport =
+        binding_lport_find(binding_lports, pb->logical_port);
+
+    if (b_lport && b_lport->lbinding != parent_lbinding) {
+        /* The container lport's parent has changed.  So remove it from
+         * the related_lports so that it is tracked. */
+        remove_related_lport(b_lport->pb, b_ctx_out);
+    }
+
     struct binding_lport *container_b_lport =
         local_binding_add_lport(binding_lports, parent_lbinding, pb,
                                 LP_CONTAINER);
-- 
2.31.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to