@@ -352,6 +352,14 @@ vtep_macs_run(struct ovsdb_idl_txn *vtep_idl_txn, struct shash *ucast_macs_rmts,
continue;
}
tnl_key = peer_pb->datapath->tunnel_key;
+ } else if (!strcmp(port_binding_rec->type, "external")){
+ /* External ports not bound on specific chassis, they
+ * may sit on some of VTEP endpoints, but port itself
+ * is bound to one of gateway nodes to provide DHCP/Metadata.
+ * Skip port_binding information for such ports, as its does
+ * not specify real node location.
+ */
+ continue;
} else {
tnl_key = port_binding_rec->datapath->tunnel_key;
}
@@ -375,12 +375,25 @@ AT_CHECK([ovn-nbctl --wait=sb sync])
AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
AT_CHECK([ovn-sbctl lsp-bind vif1 ch1])
+# adds external port to chassis
+AT_CHECK([ovn-nbctl ha-chassis-group-add ext-group1])
+AT_CHECK([ovn-nbctl ha-chassis-group-add-chassis ext-group1 ch1 7268])
+AT_CHECK([ovn-sbctl set chassis ch0 other_config:ovn-cms-options=enable-chassis-as-gw])
+AT_CHECK([ovn-nbctl lsp-add br-test ext1])
+AT_CHECK([ovn-nbctl lsp-set-type ext1 external])
+AT_CHECK([ovn-nbctl lsp-set-addresses ext1 aa:bb:cc:dd:01:02])
+AT_CHECK([ovn-nbctl --wait=sb sync])
+AT_CHECK([ovn-sbctl lsp-bind ext1 ch1])
+
# checks Ucast_Macs_Remote creation.
OVS_WAIT_UNTIL([test -n "`vtep-ctl list Ucast_Macs_Remote | grep _uuid`"])
AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -d ' '], [0], [dnl
"f0:ab:cd:ef:01:02"
])
+# check that `external` ports i not in Ucast_Macs_Remote
+AT_CHECK([test -z "`vtep-ctl list Ucast_Macs_Remote | grep aa:bb:cc:dd:01:02`"])
+
# checks physical locator creation.
OVS_WAIT_UNTIL([test -n "`vtep-ctl list Physical_Locator | grep _uuid`"])
AT_CHECK([vtep-ctl --columns=dst_ip list Physical_Locator | cut -d ':' -f2 | tr -d ' ' | grep -v 1.2.3.4 | sed '/^$/d'], [0], [dnl