On 10/16/25 10:40 AM, Felix Huettner via dev wrote:
> On Tue, Oct 07, 2025 at 05:27:43PM +0300, 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.
> 
> Hi Alexandra,
> 
> sorry for taking so long to take a look.
> That seems reasonable to me.
> 
> However there seems to be some issue with applying the patch in the CI.
> Still take this:
> Signed-off-by: Felix Huettner <[email protected]>
> 

Hi Felix,

Hmm, I'm a bit confused about this.

This patch from Alexandra was already accepted:
https://github.com/ovn-org/ovn/commit/951d992

Do you mean to say you should've been co-author or did you actually want
to ack the patch?

There's a backport patch available for review for branches <= 25.03:

https://patchwork.ozlabs.org/project/ovn/patch/[email protected]/

That's because there were too many non-trivial conflicts when I tried to
backport the original fix to older branches, see:
https://mail.openvswitch.org/pipermail/ovs-dev/2025-October/426866.html

Thanks,
Dumitru

> Thanks,
> Felix
> 
>>
>> Fixes: b1f8d726390e ("ovn-ic: support learning routes in same AZ")
>> Signed-off-by: Alexandra Rukomoinikova <[email protected]>
>> Tested-by: Evgeniy Kovalev <[email protected]>
>> ---
>>  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 fa4a6b118..f989f91cc 100644
>> --- a/ic/ovn-ic.c
>> +++ b/ic/ovn-ic.c
>> @@ -1702,15 +1702,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
>> +             * 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 74ea3bad2..d2c2d70ed 100644
>> --- a/tests/ovn-ic.at
>> +++ b/tests/ovn-ic.at
>> @@ -4047,3 +4047,54 @@ 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
>> +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"
>> +
>> +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
>> +
>> +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
>> +])
>> +
>> -- 
>> 2.48.1
>>
>> _______________________________________________
>> dev mailing list
>> [email protected]
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 

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

Reply via email to