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. Assisted-by: Claude Opus 4.8, Claude Code Signed-off-by: Paulo Guilherme Silva <[email protected]> --- northd/en-global-config.c | 4 ++-- tests/ovn-northd.at | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/northd/en-global-config.c b/northd/en-global-config.c index 4e6b07ebe..f31e7d3f2 100644 --- a/northd/en-global-config.c +++ b/northd/en-global-config.c @@ -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; } diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at index b900a4867..843fd9b82 100644 --- a/tests/ovn-northd.at +++ b/tests/ovn-northd.at @@ -3323,6 +3323,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]) -- 2.34.1 -- _'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
