When a port type is changed from e.g. patch (which is a related_port) to VIF which can be claimed by another chassis, then the port should be removed from the related_ports set.
Test "ovn-controller local bindings" was already testing this but not checking whether related_ports were correct. This will be automatically tested when related_lports will be checked at the end of the tests, in a following patch. Signed-off-by: Xavier Simonart <[email protected]> --- controller/binding.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controller/binding.c b/controller/binding.c index 210809944..1f3f74998 100644 --- a/controller/binding.c +++ b/controller/binding.c @@ -2969,6 +2969,13 @@ handle_updated_port(struct binding_ctx_in *b_ctx_in, case LP_VIF: case LP_CONTAINER: case LP_VIRTUAL: + /* If port binding type just changed, port might be a "related_lport" + * while it should not. Remove it from that set. It will be added + * back later if needed. + */ + if (sbrec_port_binding_is_updated(pb, SBREC_PORT_BINDING_COL_TYPE)) { + remove_related_lport(pb, b_ctx_out); + } update_ld_multichassis_ports(pb, b_ctx_out->local_datapaths); handled = handle_updated_vif_lport(pb, lport_type, b_ctx_in, b_ctx_out); -- 2.31.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
