Commit be7fb53c42 ("northd: Treat remote LSPs backing LRPs as router
ports.") made lsp_is_router() return true for type=remote ports with
options:is_router=true.  ovn_port_update_sbrec() uses lsp_is_router() to
decide how to sync the Port_Binding, so such ports are now synced as
router ports: the Port_Binding type becomes "patch", its options are
cleared, including requested-chassis, and its remote chassis is
unbound.  ovn-controller then has no tunnel to send traffic to the
remote port, which breaks the communication with the other AZ.

Keep syncing remote ports as remote ports in ovn_port_update_sbrec(),
regardless of is_router.  The rest of the router port handling, e.g.
the _MC_flood_l2 exclusion and skipping the static ARP/ND entries of
the remote port, is unchanged.

Fixes: be7fb53c42f8 ("northd: Treat remote LSPs backing LRPs as router ports.")
Assisted-by: Claude Opus 5.5, Claude Code
Signed-off-by: Lucas Vargas Dias <[email protected]>
---
 northd/northd.c     |  5 ++++-
 ovn-nb.xml          |  5 ++++-
 tests/ovn-northd.at | 48 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index e4acb11ab..57147ad53 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -2870,7 +2870,10 @@ ovn_port_update_sbrec(struct ovsdb_idl_txn *ovnsb_txn,
             goto common;
         }
 
-        if (!lsp_is_router(op->nbsp)) {
+        /* Remote ports marked with options:is_router are still bound to
+         * a remote chassis, so keep syncing them as remote ports instead of
+         * turning them into patch ports. */
+        if (!lsp_is_router(op->nbsp) || lsp_is_remote(op->nbsp)) {
             uint32_t queue_id = smap_get_int(
                     &op->sb->options, "qdisc_queue_id", 0);
             bool has_qos = port_has_qos_params(&op->nbsp->options);
diff --git a/ovn-nb.xml b/ovn-nb.xml
index 0d18010aa..7f4ee95b4 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -1811,7 +1811,10 @@
           <code>remote</code> LSPs that back LRPs in another OVN
           interconnection zone.  Such ports are omitted from the
           <code>_MC_flood_l2</code> multicast group so IP multicast is not
-          flooded toward them.  Ignored unless <ref column="type"/> is
+          flooded toward them, and no static ARP/ND entries are created
+          for their addresses in the routers connected to the switch, so
+          they are resolved dynamically.  The port is still bound to its
+          remote chassis.  Ignored unless <ref column="type"/> is
           <code>remote</code>.  Default: <code>false</code>.
         </column>
       </group>
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index f1e88b4bd..ba16b5f41 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -9592,6 +9592,54 @@ OVN_CLEANUP_NORTHD
 AT_CLEANUP
 ])
 
+OVN_FOR_EACH_NORTHD_NO_HV([
+AT_SETUP([LSP type=remote options:is_router keeps the remote binding])
+ovn_start
+
+check ovn-sbctl chassis-add gw-az2 geneve 10.0.0.2 \
+    -- set chassis gw-az2 other_config:is-remote=true
+
+check ovn-nbctl lr-add lr0
+check ovn-nbctl lrp-add lr0 lr0-ts 00:00:00:00:11:03 169.254.11.3/24
+check ovn-nbctl ls-add ts
+check ovn-nbctl lsp-add-router-port ts ts-lr0 lr0-ts
+check ovn-nbctl lsp-add ts remote1 \
+    -- lsp-set-type remote1 remote \
+    -- lsp-set-addresses remote1 "00:00:00:00:11:02 169.254.11.2" \
+    -- lsp-set-options remote1 requested-chassis=gw-az2
+check ovn-nbctl --wait=sb sync
+
+gw_uuid=$(fetch_column Chassis _uuid name=gw-az2)
+check_column remote Port_Binding type logical_port=remote1
+check_column "$gw_uuid" Port_Binding chassis logical_port=remote1
+AT_CHECK([ovn-sbctl lflow-list lr0 | grep lr_in_arp_resolve | \
+          grep -c 169.254.11.2], [0], [1
+])
+
+dnl Marking the port as a router port only drops the static ARP entry,
+dnl the port is still bound to the remote chassis.
+check ovn-nbctl --wait=sb set Logical_Switch_Port remote1 \
+    options:is_router=true
+check_column remote Port_Binding type logical_port=remote1
+check_column "$gw_uuid" Port_Binding chassis logical_port=remote1
+AT_CHECK([ovn-sbctl get Port_Binding remote1 options:requested-chassis], [0], 
[dnl
+gw-az2
+])
+AT_CHECK([ovn-sbctl lflow-list lr0 | grep lr_in_arp_resolve | \
+          grep -c 169.254.11.2], [1], [0
+])
+
+check ovn-nbctl --wait=sb remove Logical_Switch_Port remote1 options is_router
+check_column remote Port_Binding type logical_port=remote1
+check_column "$gw_uuid" Port_Binding chassis logical_port=remote1
+AT_CHECK([ovn-sbctl lflow-list lr0 | grep lr_in_arp_resolve | \
+          grep -c 169.254.11.2], [0], [1
+])
+
+OVN_CLEANUP_NORTHD
+AT_CLEANUP
+])
+
 OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
 AT_SETUP([ACLs after lb])
 AT_KEYWORDS([acl])
-- 
2.43.0


-- 




_'Esta mensagem é direcionada apenas para os endereços constantes no 
cabeçalho inicial. Se você não está listado nos endereços constantes no 
cabeçalho, pedimos-lhe que desconsidere completamente o conteúdo dessa 
mensagem e cuja cópia, encaminhamento e/ou execução das ações citadas estão 
imediatamente anuladas e proibidas'._


* **'Apesar do Magazine Luiza tomar 
todas as precauções razoáveis para assegurar que nenhum vírus esteja 
presente nesse e-mail, a empresa não poderá aceitar a responsabilidade por 
quaisquer perdas ou danos causados por esse e-mail ou por seus anexos'.*



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

Reply via email to