From patchwork Wed Aug 30 06:20:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felix Huettner X-Patchwork-Id: 1827583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mail.schwarz header.i=@mail.schwarz header.a=rsa-sha256 header.s=selector1 header.b=G/Bvro3U; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RbDgJ64wHz1yZ9 for ; Wed, 30 Aug 2023 16:20:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9D05260EA6; Wed, 30 Aug 2023 06:20:26 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9D05260EA6 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=mail.schwarz header.i=@mail.schwarz header.a=rsa-sha256 header.s=selector1 header.b=G/Bvro3U X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id edENeO5cCkVf; Wed, 30 Aug 2023 06:20:25 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 8D57260B79; Wed, 30 Aug 2023 06:20:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8D57260B79 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 62524C0039; Wed, 30 Aug 2023 06:20:24 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 508C7C0032 for ; Wed, 30 Aug 2023 06:20:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EE14A409E7 for ; Wed, 30 Aug 2023 06:20:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EE14A409E7 Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=mail.schwarz header.i=@mail.schwarz header.a=rsa-sha256 header.s=selector1 header.b=G/Bvro3U X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JebSxSAxBhrn for ; Wed, 30 Aug 2023 06:20:20 +0000 (UTC) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on071c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe02::71c]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0F32F40491 for ; Wed, 30 Aug 2023 06:20:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0F32F40491 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ggONYB3lYjntK/rcj4vwbeUfEpAN4IOcigJ/yfRNJg4hnr+APn2+ivy0uV+IO2Lnh96rWU+AAPdhIRBZ4wyNfz1XbtuHz4NjesW86MvnVkvYMAOvj8PcrWYmeLXrowYZDVNQLQZSmRHJm00Aem1/he3bfp+U6MSIsTCq+/N6ytejA1LfVPbXT1xTf/CVOisRYYqgpRG1G0fikFoDGoM38RTXTiSVKuMprYWoGKjuswGqVLMFxa9q7HYlhfQb6vHqUAcQHO19MBed0o2eVV49VBvX4ToxhF+pQTC6KJWE1zIj5LTLWM3/Aq51QFvaUntRaD2dks+eyiEgwgQpdU2u/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2HA6cVcNIorYJlFUdHrkm+kEZ8+jWyn7ZOqhQJAkm4Q=; b=ijCAV33UOkGtfV/h9SlTDSzH9FkUCHIv8ANZoy6Uh1HTZTrj048mDZiaQC/9JiextsHJzRnLi/uFl/UiYr77nQABjOKBtl4yvfyJ2yN0Ur0x07U4fd7T0ZgySakQBrqsZwA+A/EF/Q3FwwuCfqYtjIhl28xuIIbbnmuk1ic6vwAOpywHwa8X3Bhc+PytnlOnQXVyaMZMn0xTl9TLb7Yf6y2AZaOSvVJuuHix5y3m1HrdBXLEp7UoPFlcVXTEnBdXR7+HicDVarX4XC8PmANsvZZoEifbnZpC0tUHWYRQU/uciE6Hb2fpzWZ5NNa0JqwYpnzU0qPb0IeJc8izdhTQDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mail.schwarz; dmarc=pass action=none header.from=mail.schwarz; dkim=pass header.d=mail.schwarz; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.schwarz; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2HA6cVcNIorYJlFUdHrkm+kEZ8+jWyn7ZOqhQJAkm4Q=; b=G/Bvro3U1kEgHbThZc9uTGOZcCSwxcJY+gqyD1jlgRgJMqpoxdHls+FiLNoEUBO86MUi8/CCE8+QaBcg2MhaFN5mha4D2fo5E7SujS/xBgexHxA13CP6bggE3szO9UIAP/jMWHAqrIUnH6Sgz6miMbpxVGfMf0AGuP44QL34kMD0/yZBG9+u+H7cNtmRMHsBP2B4QC/0fADHQuqyKJxLVFQ0NYHTO6MjIPwPK5cIpNbKvtjjksnduYddyLvv/kacpvR0tc2yAeQhjWRw4PwmtelrMXzXgLiQECMHuOEqXYEvjSGJUT+QjWKznm9kF9u6WmjO69N/mKpeYeklQjrI2w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mail.schwarz; Received: from DU0PR10MB5244.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:34c::22) by AS2PR10MB7640.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:642::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.35; Wed, 30 Aug 2023 06:20:15 +0000 Received: from DU0PR10MB5244.EURPRD10.PROD.OUTLOOK.COM ([fe80::ec40:f47d:15c4:258a]) by DU0PR10MB5244.EURPRD10.PROD.OUTLOOK.COM ([fe80::ec40:f47d:15c4:258a%4]) with mapi id 15.20.6699.034; Wed, 30 Aug 2023 06:20:15 +0000 Date: Wed, 30 Aug 2023 08:20:11 +0200 To: dev@openvswitch.org Message-ID: Mail-Followup-To: dev@openvswitch.org, maxim.korezkij@mail.schwarz Content-Disposition: inline X-ClientProxiedBy: FR3P281CA0107.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a3::17) To DU0PR10MB5244.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:34c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR10MB5244:EE_|AS2PR10MB7640:EE_ X-MS-Office365-Filtering-Correlation-Id: 03e57d81-858a-4d4f-e06f-08dba9212c9d x-mp-schwarz-dsgvo2: 1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PPG50xj5uyWxrAE6/8Hy6hupkBEurfz0h7WExQ+c1eGwZQawu7cI2AeYSyI4pbxwTCLQcxOq1VUXBsJ0ZMlVuGS5I0elruU6oeMgdFarQNz7h9uOSr/9ByMvca4n1tAintTKlBRJ3PHXF9JKBcBb0Lm0SiOpIdb9dTV7+ITIlKyz+7Dm7XMCExoQMDdnmptLlco+dTz9EBRh9OK+HxdKk7PIpjbibe07Qbkile2qhykxhC0/XCWvOGOGLz6PDFQ/M77EXmCi+lRBPa7BORaVpqGKJk2OAAJry1rOWdAZkP+ioXKIFkyLlvHAiImsrcV33xqXGlYMaWpNVdoHuRZvHzSAeCd60/wanPowYgC1ZDOSTWsK9GJEyCBh+aZleYFA7AuYqAwwwQVmqfm60nZL05RIPGxIqjgVGkumNKmrpnHKo0q4qNPan95Z4B+/gyxYojkQ0YTxET8xrIlUc8iLVqNKQEKU1irNS3ykTIwJl2Sfj8wUfzJ5nsyo3WIAVtuyhhEHLc/oTCazZc9ciyY7OZzpv3ZCo8sIfCyHkNT8ye8V3yIblJh/Tuol8ZrDyhd8 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR10MB5244.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(366004)(376002)(136003)(39860400002)(396003)(346002)(186009)(1800799009)(451199024)(66556008)(66476007)(6916009)(2906002)(66946007)(316002)(41300700001)(9686003)(6512007)(44832011)(6666004)(6506007)(6486002)(5660300002)(107886003)(26005)(66574015)(83380400001)(86362001)(38100700002)(8936002)(4326008)(8676002)(478600001)(82960400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y0Y0SPxO00HvGRc8SK9d7WiIQDBnc4CQv2HPGcrOL5AIRi8NKUtSy7tufyQmTar0hyxf51JZGQrGZ+rhH+PI9wYcAXlcEeGmMFQhr+/jcLuKREpIDDXWaXj+VPT92wnhKUOLkeSw9i7OCA1Wh6HZZEpJ1FKpLFaBoZ7b7DBA4zIOaOnuAsH3sXh5sFLWxSSdwt++ksL/0d7kUlFLnsAHA1HqcX6otVzg56I9pmj5f8sTJhxLQeHDq28ALr6/OWWi+ldnxDYa8F3fbZeEulWuJDizrKiMGC18TEHESpzyg17dS7qcuYeOCx/evTvJj16rASfqrol2wqDwORrjjVEyEojhG1hqeOJufvLZJpqibmSliDgV1lA85HKBl/oVV7KdLw46QpNGm2u4xtaC52F7aHBnnuXmavG3VtWSgmHKZyY2Z3YW349vGu0mbRWEYnTiEvlZL/OSuKOYYyDLx+KAf4rVaiyTqSN+pkSwnrVvQ2pRW0QeWmkFtjRqiWCGQQOpy8bcB7pM4Vmt3stQUZ3AJDKpqtemOkb+lCkjzoHtSCLAcELf4sgcvfoBdmSvlI8VJKE9/z6YCSartcBkBEkShqO4m65c7QkvTKayXwOrl3wXhDm28DeuDMIK5SucOUuTnR3UiwJLR2iSfJu5u8BE+jcjS1Yc35VrFm5kcz21T/Tjn/U2uFs9sra3p+KXLH35wZDXzRFePRFrKyObjTlRS6IDg6ySiP2qmiP3EGxLaRwkOkD6tsYQrRZWMo4uY2RjFltGp8vCZbq1rclE3nED9tSInmJdRUxZg6FHmf+D/WduZcREzlodggIj0fCAzCOQhLmFFwRLY81CQ1G1kdyAX0qSerh10Ab88YnLgNS7Za8O1oyBBmqXg1eRYbYjK39LMCtyHyptV8e1h7UPHH2uW0qqBqieAEDrHLtbGil4HStUtoChwW//n889/7RzREwQzmgKZAGyXp3J/h3R/eqS0rk9soLUNyij0UwULPzqx6zPshLtps8/W38x1aWEy78cK7ypPPxDbKm0NnzJjX4C+Dwgm2LIsbwIVpgFL1d4rmmHAC5efeKCHFmSl97fXQtkn5MkMgA8PMcvqqOKKIYD/3MJYSC//CRRGsLWjEEowpVsP64NYdiejPPaLakH7dZ+UoOLdQxefuqEdSah+y9ZTdX6X02AII/MsaTkymQttAxczuJxoHacyIKiOwPFR+ZL5DUmbUqMzzYiQ0w7Sqc/9cjEENjl+GP+HblzUGzvehCul1NRuNt5oboobPDjNMGRQCH1qQssjIUhZiJW4oQc7mgiLZRPRox3Mj5fpNPDbpohGn1uho7y4+Mn/TY7yjY6pGnUZXKwXM6B+y2+X69JDkYYCXENWHB+tJhYkIOa2HqeVWSPAMs7jLRHOuPb2D322p69MCYiyvfAfMJX/Jv5D40og2RK+uFbUyMBFSTT+1uFbfwDJwpl2xdKpnmU6rMZM6lAeyR2DxMgePSXvRBRaRySJAQcYUWUzj4Pe03S0e9BZVQxp86rJKf0/8cSEbAWxHY3iDhGsaobMzF4kDrkDbTKGKNlMzp5kzHZkykL6cSXz+U5rqd4Px17k1T7wQoTbw7S4K7vcez6IPHnYi1IAQ== X-OriginatorOrg: mail.schwarz X-MS-Exchange-CrossTenant-Network-Message-Id: 03e57d81-858a-4d4f-e06f-08dba9212c9d X-MS-Exchange-CrossTenant-AuthSource: DU0PR10MB5244.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2023 06:20:15.2144 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d04f4717-5a6e-4b98-b3f9-6918e0385f4c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zoWRuG2OETXUZe/H+iOm84txBE+VyPAv5z/BIU8iMvWJw3GTyp4F+CGKp3YkY513I6taFUgq+E6ydyKLvDhhzaeotUTue7ryR4ZTrZtigc8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7640 Subject: [ovs-dev] [PATCH ovn v2 1/2] ovn-ic fix multiple routers in an az X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Felix Huettner via dev From: Felix Huettner Reply-To: Felix Huettner Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" previously if multiple routers in the same az are connected to the same transit switch then ovn-ic would only propagate the routes of one of these routers to the ic-sb. This commit fixes this behaviour and allows multiple routers in a single az to use route advertisements. Co-authored-by: Maxim Korezkij Signed-off-by: Maxim Korezkij Signed-off-by: Felix Huettner --- ic/ovn-ic.c | 27 +++++++++++----- tests/ovn-ic.at | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 8 deletions(-) -- 2.42.0 Diese E Mail enthält möglicherweise vertrauliche Inhalte und ist nur für die Verwertung durch den vorgesehenen Empfänger bestimmt. Sollten Sie nicht der vorgesehene Empfänger sein, setzen Sie den Absender bitte unverzüglich in Kenntnis und löschen diese E Mail. Hinweise zum Datenschutz finden Sie hier. This e-mail may contain confidential content and is intended only for the specified recipient/s. If you are not the intended recipient, please inform the sender immediately and delete this e-mail. Information on data protection can be found here. diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c index db7e86bc1..ec749e25f 100644 --- a/ic/ovn-ic.c +++ b/ic/ovn-ic.c @@ -1587,9 +1587,9 @@ build_ts_routes_to_adv(struct ic_context *ctx, } static void -advertise_lr_routes(struct ic_context *ctx, - const struct icsbrec_availability_zone *az, - struct ic_router_info *ic_lr) +collect_lr_routes(struct ic_context *ctx, + struct ic_router_info *ic_lr, + struct shash *routes_ad_by_ts) { const struct nbrec_nb_global *nb_global = nbrec_nb_global_first(ctx->ovnnb_idl); @@ -1600,7 +1600,7 @@ advertise_lr_routes(struct ic_context *ctx, struct lport_addresses ts_port_addrs; const struct icnbrec_transit_switch *key; - struct hmap routes_ad = HMAP_INITIALIZER(&routes_ad); + struct hmap *routes_ad; for (int i = 0; i < ic_lr->n_isb_pbs; i++) { isb_pb = ic_lr->isb_pbs[i]; key = icnbrec_transit_switch_index_init_row( @@ -1609,6 +1609,12 @@ advertise_lr_routes(struct ic_context *ctx, ts_name = icnbrec_transit_switch_index_find( ctx->icnbrec_transit_switch_by_name, key)->name; icnbrec_transit_switch_index_destroy_row(key); + routes_ad = shash_find_data(routes_ad_by_ts, ts_name); + if (!routes_ad) { + routes_ad = xzalloc(sizeof *routes_ad); + hmap_init(routes_ad); + shash_add(routes_ad_by_ts, ts_name, routes_ad); + } if (!extract_lsp_addresses(isb_pb->address, &ts_port_addrs)) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1); @@ -1620,12 +1626,10 @@ advertise_lr_routes(struct ic_context *ctx, } lrp_name = get_lrp_name_by_ts_port_name(ctx, isb_pb->logical_port); route_table = get_route_table_by_lrp_name(ctx, lrp_name); - build_ts_routes_to_adv(ctx, ic_lr, &routes_ad, &ts_port_addrs, + build_ts_routes_to_adv(ctx, ic_lr, routes_ad, &ts_port_addrs, nb_global, route_table); - advertise_routes(ctx, az, ts_name, &routes_ad); destroy_lport_addresses(&ts_port_addrs); } - hmap_destroy(&routes_ad); } static void @@ -1726,14 +1730,21 @@ route_run(struct ic_context *ctx, icsbrec_port_binding_index_destroy_row(isb_pb_key); struct ic_router_info *ic_lr; + struct shash routes_ad_by_ts = SHASH_INITIALIZER(&routes_ad_by_ts); HMAP_FOR_EACH_SAFE (ic_lr, node, &ic_lrs) { - advertise_lr_routes(ctx, az, ic_lr); + collect_lr_routes(ctx, ic_lr, &routes_ad_by_ts); sync_learned_routes(ctx, az, ic_lr); free(ic_lr->isb_pbs); hmap_destroy(&ic_lr->routes_learned); hmap_remove(&ic_lrs, &ic_lr->node); free(ic_lr); } + struct shash_node *node; + SHASH_FOR_EACH_SAFE (node, &routes_ad_by_ts) { + advertise_routes(ctx, az, node->name, node->data); + hmap_destroy(node->data); + } + shash_destroy_free_data(&routes_ad_by_ts); hmap_destroy(&ic_lrs); } diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at index a654e59fe..8ef2362c4 100644 --- a/tests/ovn-ic.at +++ b/tests/ovn-ic.at @@ -1164,3 +1164,89 @@ AT_CHECK([ovn_as az2 ovn-nbctl lr-route-list lr12 | grep dst-ip | sort], [0], [d AT_CLEANUP ]) + +OVN_FOR_EACH_NORTHD([ +AT_SETUP([ovn-ic -- route sync -- multiple logical routers]) + +ovn_init_ic_db +ovn-ic-nbctl ts-add ts1 + +for i in 1 2; do + ovn_start az$i + ovn_as az$i + + # Enable route learning at AZ level + ovn-nbctl set nb_global . options:ic-route-learn=true + # Enable route advertising at AZ level + ovn-nbctl set nb_global . options:ic-route-adv=true +done + +# Create new transit switches and LRs. Test topology is next: +# +# logical router (lr11) - transit switch (ts1) - logical router (lr21) +# \- logical router (lr22) +# +# each LR has one connected subnet except TS port + + +# create lr11, lr21, lr22, ts1 and connect them +ovn-ic-nbctl ts-add ts1 + +ovn_as az1 + +lr=lr11 +ovn-nbctl lr-add $lr + +lrp=lrp-$lr-ts1 +lsp=lsp-ts1-$lr +# Create LRP and connect to TS +ovn-nbctl lrp-add $lr $lrp aa:aa:aa:aa:a1:01 169.254.10.11/24 +ovn-nbctl lsp-add ts1 $lsp \ + -- lsp-set-addresses $lsp router \ + -- lsp-set-type $lsp router \ + -- lsp-set-options $lsp router-port=$lrp + +ovn_as az2 +for i in 1 2; do + lr=lr2$i + ovn-nbctl lr-add $lr + + lrp=lrp-$lr-ts1 + lsp=lsp-ts1-$lr + # Create LRP and connect to TS + ovn-nbctl lrp-add $lr $lrp aa:aa:aa:aa:a2:0$i 169.254.10.2$i/24 + ovn-nbctl lsp-add ts1 $lsp \ + -- lsp-set-addresses $lsp router \ + -- lsp-set-type $lsp router \ + -- lsp-set-options $lsp router-port=$lrp +done + + +# Create directly-connected routes +ovn_as az1 ovn-nbctl lrp-add lr11 lrp-lr11 aa:aa:aa:aa:bb:01 "192.168.0.1/24" +ovn_as az2 ovn-nbctl lrp-add lr21 lrp-lr21 aa:aa:aa:aa:bc:01 "192.168.1.1/24" +ovn_as az2 ovn-nbctl lrp-add lr22 lrp-lr22 aa:aa:aa:aa:bc:02 "192.168.2.1/24" + +# Test direct routes from lr21 and lr22 were learned to lr11 +AT_CHECK([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep 192.168 | + grep learned | awk '{print $1, $2}' | sort ], [0], [dnl +192.168.1.0/24 169.254.10.21 +192.168.2.0/24 169.254.10.22 +]) + +# Test direct routes from lr11 and lr22 were learned to lr21 +AT_CHECK([ovn_as az2 ovn-nbctl lr-route-list lr21 | grep 192.168 | + grep learned | awk '{print $1, $2}' | sort ], [0], [dnl +192.168.0.0/24 169.254.10.11 +]) + +# Test direct routes from lr11 and lr21 were learned to lr22 +AT_CHECK([ovn_as az2 ovn-nbctl lr-route-list lr22 | grep 192.168 | + grep learned | awk '{print $1, $2}' | sort ], [0], [dnl +192.168.0.0/24 169.254.10.11 +]) + +OVN_CLEANUP_IC([az1], [az2]) + +AT_CLEANUP +]) \ No newline at end of file