Hi Dumitru! Thanks for the review, yes, I will send backports!
On 08.10.2025 14:46, Dumitru Ceara wrote:
> On 10/7/25 5:33 PM, Alexandra Rukomoinikova wrote:
>> Restore inter-AZ connectivity during OVN upgrades by allowing
>> legacy routes (without lr-id) from different availability zones
>> to be learned. Previously, updated nodes skipped all routes
>> without lr-id, breaking connectivity to non-upgraded AZs.
>>
>> The fix checks availability zone for legacy routes instead of
>> skipping them entirely, maintaining backward compatibility.
>>
>> Fixes: b1f8d726390e ("ovn-ic: support learning routes in same AZ")
>> Signed-off-by: Alexandra Rukomoinikova <[email protected]>
>> Tested-by: Evgeniy Kovalev <[email protected]>
>> ---
> Hi Alexandra, Evgeniy,
>
> Thanks for the patch!
>
>> v1 --> v2: fix "new blank line at EOF" error while applying.
>> ---
>> ic/ovn-ic.c | 17 ++++++++++-------
>> tests/ovn-ic.at | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 61 insertions(+), 7 deletions(-)
>> diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c
>> index 13e5534e7..557fe6c94 100644
>> --- a/ic/ovn-ic.c
>> +++ b/ic/ovn-ic.c
>> @@ -1734,15 +1734,18 @@ sync_learned_routes(struct ic_context *ctx,
>>
>> ICSBREC_ROUTE_FOR_EACH_EQUAL (isb_route, isb_route_key,
>> ctx->icsbrec_route_by_ts) {
>> + /* Filters ISSB routes, skipping those that either belong to
> typo: s/ISSB/ICSB/
>
>> + * current logical router or are legacy routes from the current
>> + * availability zone (withoud lr-id).
>> + */
>> const char *lr_id = smap_get(&isb_route->external_ids,
>> "lr-id");
>> - if (lr_id == NULL) {
>> - continue;
>> - }
>> struct uuid lr_uuid;
>> - if (!uuid_from_string(&lr_uuid, lr_id)) {
>> - continue;
>> - }
>> - if (uuid_equals(&ic_lr->lr->header_.uuid, &lr_uuid)) {
>> + if (lr_id) {
>> + if (!uuid_from_string(&lr_uuid, lr_id)
>> + || uuid_equals(&ic_lr->lr->header_.uuid, &lr_uuid)) {
>> + continue;
>> + }
>> + } else if (isb_route->availability_zone == ctx->runned_az) {
>> continue;
>> }
>>
>> diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
>> index 2d92f3adf..87f6a33f5 100644
>> --- a/tests/ovn-ic.at
>> +++ b/tests/ovn-ic.at
>> @@ -4058,6 +4058,57 @@ OVN_CLEANUP_IC([az1], [az2], [az3])
>> AT_CLEANUP
>> ])
>>
>> +AT_BANNER([Learning routes backward compatibility])
>> +OVN_FOR_EACH_NORTHD([
>> +AT_SETUP([ovn-ic -- Backward compatibility of learning routes in the same
>> AZ])
>> +
>> +ovn_init_ic_db
>> +ovn_start az1
>> +
>> +# Enable route learning at AZ level
>> +check ovn-nbctl set nb_global . options:ic-route-learn=true
>> +# Enable route advertising at AZ level
>> +check ovn-nbctl set nb_global . options:ic-route-adv=true
>> +
>> +# Create a fake availability zone to announce a route from.
>> +# This route will not have an lr-id in its external_ids, simulating
>> +# the behavior of the legacy code. The system is expected to
>> +# learn this route to maintain backward compatibility.
>> +ovn-ic-sbctl create Availability_Zone name=fake_az
> Missing check_uuid.
>
>> +fake_az_uuid=$(fetch_column ic-sb:availability-zone _uuid name="fake_az")
>> +ovn-ic-sbctl create Gateway name=fake_az_gw availability_zone=$fake_az_uuid
>> \
>> + encap=@encap -- --id=@encap create encap type=geneve ip="192.168.0.2"
> Missing check_uuid.
>
>> +
>> +check ovn-ic-nbctl ts-add ts1
>> +check ovn-ic-nbctl ts-add ts2
>> +
>> +check ovn-nbctl lr-add lr1
>> +check ovn-nbctl lrp-add lr1 lrp-lr1-ts1 aa:aa:aa:aa:aa:02 169.254.100.1/24
>> +check ovn-nbctl lsp-add ts1 lsp-ts1-lr1 -- \
>> + lsp-set-addresses lsp-ts1-lr1 router -- \
>> + lsp-set-type lsp-ts1-lr1 router -- \
>> + lsp-set-options lsp-ts1-lr1 router-port=lrp-lr1-ts1
>> +
>> +# Check ISB
>> +check_row_count ic-sb:Datapath_Binding 1 transit_switch=ts1
>> +check_row_count ic-sb:Datapath_Binding 1 transit_switch=ts2
>> +
>> +ovn-ic-sbctl create Route availability_zone=$fake_az_uuid
>> ip_prefix="172.31.0.0/24" nexthop="169.254.100.2" origin=connected
>> transit_switch=ts1
> Missing check_uuid and maybe we should split this long line.
>
>> +
>> +AT_CHECK([ovn-ic-sbctl find Route nexthop="169.254.100.2" | grep
>> external_ids], [0], [dnl
>> +external_ids : {}
>> +])
>> +
>> +AT_CHECK([ovn-nbctl lr-route-list lr1], [0], [dnl
>> +IPv4 Routes
>> +Route Table <main>:
>> + 172.31.0.0/24 169.254.100.2 dst-ip (learned)
>> +])
>> +
>> +OVN_CLEANUP_IC([az1])
>> +AT_CLEANUP
>> +])
>> +
>> OVN_FOR_EACH_NORTHD([
>> AT_SETUP([ovn-ic -- prefix filter -- deny route adv])
>> ovn_init_ic_db
> I took care of the small things I listed above and applied the patch to
> main and 25.09. It doesn't apply cleanly to older branches because we
> don't have access to 'az' in sync_learned_routes() there. Could you
> please post a custom backport patch for branches <= 25.03?
>
> https://github.com/ovn-org/ovn/blob/main/Documentation/internals/contributing/backporting-patches.rst#backport-policy
>
> Thanks,
> Dumitru
>
>
--
regards,
Alexandra.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev