@@ -187,7 +187,7 @@ en_global_config_run(struct engine_node *node , void *data)
bool ic_vxlan_mode = false;
const struct nbrec_logical_switch *nbs;
NBREC_LOGICAL_SWITCH_TABLE_FOR_EACH (nbs, nbrec_ls_table) {
- if (smap_get(&nbs->other_config, "ic-vxlan_mode")) {
+ if (smap_get_bool(&nbs->other_config, "ic-vxlan_mode", false)) {
ic_vxlan_mode = true;
break;
}
@@ -478,7 +478,7 @@ global_config_nb_logical_switch_handler(struct engine_node *node,
bool ic_vxlan_mode = false;
const struct nbrec_logical_switch *nbs;
NBREC_LOGICAL_SWITCH_TABLE_FOR_EACH (nbs, nbrec_ls_table) {
- if (smap_get(&nbs->other_config, "ic-vxlan_mode")) {
+ if (smap_get_bool(&nbs->other_config, "ic-vxlan_mode", false)) {
ic_vxlan_mode = true;
break;
}
@@ -3392,6 +3392,24 @@ check ovn-nbctl --wait=sb set logical-switch LS other-config:interconn-ts=LS
check ovn-nbctl --wait=sb set logical-switch LS other-config:ic-vxlan_mode=true
AT_CHECK([test "$(get_max_tunid)" -eq 1023])
+dnl ovn-ic stamps ic-vxlan_mode on every transit switch, including with the
+dnl value "false". Only a true value must restrict the tunnel key range.
+check ovn-nbctl --wait=sb set logical-switch LS other-config:ic-vxlan_mode=false
+AT_CHECK([test "$(get_max_tunid)" -eq 4095])
+
+dnl Anything that is not a boolean true is treated as false.
+check ovn-nbctl --wait=sb set logical-switch LS other-config:ic-vxlan_mode=foo
+AT_CHECK([test "$(get_max_tunid)" -eq 4095])
+
+dnl The same must hold on a full recompute, not only on the incremental path.
+check ovn-appctl -t northd/ovn-northd inc-engine/recompute
+check ovn-nbctl --wait=sb sync
+AT_CHECK([test "$(get_max_tunid)" -eq 4095])
+
+dnl Setting it back to true restricts the range again.
+check ovn-nbctl --wait=sb set logical-switch LS other-config:ic-vxlan_mode=true
+AT_CHECK([test "$(get_max_tunid)" -eq 1023])
+
check ovn-nbctl --wait=sb clear logical-switch LS other-config
AT_CHECK([test "$(get_max_tunid)" -eq 4095])
en-global-config.c decided IC VXLAN mode (and therefore the datapath tunnel-id range) using smap_get(), which is true whenever the key EXISTS. ovn-ic stamps other_config:ic-vxlan_mode on every transit switch, including the literal value "false". As a result northd treated plain Geneve deployments as VXLAN-IC and capped max_dp_tunnel_id at OVN_MAX_DP_VXLAN_KEY_LOCAL (1023); past ~1023 local datapaths northd fails datapath tunnel-id allocation and the SB never converges. Read the boolean value with smap_get_bool() instead. Fixes: 059763e8683d ("ic: Fix vxlan encap mode.") Assisted-by: Claude Opus 4.8, Claude Code Signed-off-by: Paulo Guilherme Silva <guilherme.paulo@magalu.cloud> --- northd/en-global-config.c | 4 ++-- tests/ovn-northd.at | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-)