From patchwork Wed Nov 6 18:21:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 2007666 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" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=H9fRSrjy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4XkD8k0yRYz1xyS for ; Thu, 7 Nov 2024 05:23:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 31C8140BDB; Wed, 6 Nov 2024 18:23:00 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tOJvm5zTAeUs; Wed, 6 Nov 2024 18:22:49 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A820140DBB Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=H9fRSrjy Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id A820140DBB; Wed, 6 Nov 2024 18:22:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6A232C08A8; Wed, 6 Nov 2024 18:22:43 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 31200C08A3 for ; Wed, 6 Nov 2024 18:22:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A634A60A47 for ; Wed, 6 Nov 2024 18:22:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id nilJLKBx3coU for ; Wed, 6 Nov 2024 18:22:23 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=lorenzo.bianconi@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 8F52F60653 Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8F52F60653 Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=H9fRSrjy Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 8F52F60653 for ; Wed, 6 Nov 2024 18:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730917341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i+GI6LvsWznzmeIghjdVNgp4RBdc0QLBMfd6Flt8Vgg=; b=H9fRSrjySOIkVtoGPSAPVLanFw2gLyUM8vUUtcbmm44rmtgEKbzkD8O/Phx77yntOHfpAt wMTyrVDwpT0yodMV5wwy1ur1O1BC36JRch+mNI5jX2yOXiJz8aDiQwAegESGRuyYyShgdM eJWwO9OnMqXXBiYk0sSEBag5HYmcuEU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-91-GnBkli8sMGKykIY89t5YQw-1; Wed, 06 Nov 2024 13:22:18 -0500 X-MC-Unique: GnBkli8sMGKykIY89t5YQw-1 X-Mimecast-MFC-AGG-ID: GnBkli8sMGKykIY89t5YQw Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4315e8e9b1cso651195e9.1 for ; Wed, 06 Nov 2024 10:22:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730917337; x=1731522137; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i+GI6LvsWznzmeIghjdVNgp4RBdc0QLBMfd6Flt8Vgg=; b=ZXYqP9I3rLKNxKG10tYHBOfVrKV5+pJ0kwKr58PnvnGGzgSse8WlYySods0RxSOPaO +q0rQ+5tg1jHf/wJwFhSvpFF5fBBkroRchbN/+coDnzR42gHOPvDNnFrJmx8MoH3UvVp 0Rbx/cmUzOSMYdK56AUOuQZGeap69ioIQuHETx2QszCq5VrQLxEfeikc90cdZ4nRdJRL Vr9YSZhIKadHu8W/aPYxe4bkkr+5YsaFMbKmKaEcnHFkAJOXECDuMtAnaVp+iVuFsovc OtS6VG1nZr4cSLD6+ghOaW2Thr3y8iibzz/m4zZ0TzJlOoTjcWK//W1Z4Hf01NO822/2 XB5A== X-Gm-Message-State: AOJu0YzOtM6LhWEUrEep4zwn7UNO2UFu7peDAWrI3kSnQ6kjadLPwpzv WuafAhe31jM9vP+18/nQf7oPESg2DmviGPg/aXQxprEbM9beCVXbHHKcyVZ1W0yAevoOcVRr+xI 5mdLksQVgijif6xu+Uy5XF0A6XKw8RjVfdezRtvPGai946H0fRtixXD7iyTOj/GFYg57YuGaa1i S1D/4E2sZOomqNI1TpNQCjSPnHh2jAu1X0Ic+Zq1D72niYARPkIg== X-Received: by 2002:a05:600c:a0b:b0:42c:b826:a26c with SMTP id 5b1f17b1804b1-432af323a08mr1928015e9.8.1730917335663; Wed, 06 Nov 2024 10:22:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5MkUOhwEN6/WYyJAADH8fIOiUm7C3LYadd89Ixo4Sk7Iyu6wn6wAhyYoTPA0rPXMEc+ULAA== X-Received: by 2002:a05:600c:a0b:b0:42c:b826:a26c with SMTP id 5b1f17b1804b1-432af323a08mr1927415e9.8.1730917334155; Wed, 06 Nov 2024 10:22:14 -0800 (PST) Received: from localhost (net-93-146-37-148.cust.vodafonedsl.it. [93.146.37.148]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432aa6b2a3bsm32547685e9.11.2024.11.06.10.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 10:22:13 -0800 (PST) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Wed, 6 Nov 2024 19:21:51 +0100 Message-ID: <77ef8f483ec78f31a492d4792503a3e69acf6502.1730917155.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UpAInvPfMAeaEgcG5G8cfnrOZHqc-vfE_kQMPc9Vhwk_1730917337 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v3 ovn 05/11] test: ovn: Use check for ovn-nbctl wherever possible. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: i.maximets@ovn.org Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Reported-at: https://issues.redhat.com/browse/FDP-875 Signed-off-by: Lorenzo Bianconi --- tests/ovn.at | 3246 +++++++++++++++++++++++++------------------------- 1 file changed, 1623 insertions(+), 1623 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index dc07c09de..c9ed483a4 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -2824,7 +2824,7 @@ ovn_start # Create hypervisors hv[12]. # Add vif1[12] to hv1, vif2[12] to hv2 -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 net_add n1 for i in 1 2; do sim_add hv$i @@ -2992,12 +2992,12 @@ ovn_start # Turn on port security on all lports except ls1. # Make ls1 a destination for unknown MACs. # Add some ACLs for Ethertypes 1234, 1235, 1236. -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 ovn-sbctl chassis-add hv0 geneve 127.0.0.1 for i in 1 2 3; do ovn-nbctl lsp-add lsw0 lp$i done -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync for i in 1 2 3; do ovn-sbctl lsp-bind lp$i hv0 if test $i = 1; then @@ -3012,13 +3012,13 @@ for i in 1 2 3; do ovn-nbctl lsp-set-port-security lp$i f0:00:00:00:00:0$i fi done -ovn-nbctl acl-add lsw0 from-lport 1000 'eth.type == 0x1234' drop -ovn-nbctl acl-add lsw0 from-lport 1000 'eth.type == 0x1235 && inport == "lp1"' drop -ovn-nbctl acl-add lsw0 to-lport 1000 'eth.type == 0x1236 && outport == "lp3"' drop +check ovn-nbctl acl-add lsw0 from-lport 1000 'eth.type == 0x1234' drop +check ovn-nbctl acl-add lsw0 from-lport 1000 'eth.type == 0x1235 && inport == "lp1"' drop +check ovn-nbctl acl-add lsw0 to-lport 1000 'eth.type == 0x1236 && outport == "lp3"' drop ovn-nbctl create Address_Set name=set1 addresses=\"f0:00:00:00:00:01\",\"f0:00:00:00:00:02\" -ovn-nbctl acl-add lsw0 to-lport 1000 'eth.type == 0x1237 && eth.src == $set1 && outport == "lp3"' drop +check ovn-nbctl acl-add lsw0 to-lport 1000 'eth.type == 0x1237 && eth.src == $set1 && outport == "lp3"' drop -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) on_exit 'kill `cat ovn-trace.pid`' @@ -3299,7 +3299,7 @@ done wait_for_ports_up OVN_WAIT_PATCH_PORT_FLOWS(["ln1" "ln2" "ln3"], ["hv1"] ["hv2"]) -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -3467,7 +3467,7 @@ done wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync OVN_WAIT_PATCH_PORT_FLOWS(["ln-11" "ln-21"], ["hv-1" "hv-2"]) ovn-sbctl dump-flows > sbflows @@ -3614,7 +3614,7 @@ done wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-nbctl show ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -3766,7 +3766,7 @@ for i in 1 2; do done wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-nbctl show ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -3988,10 +3988,10 @@ check ovn-nbctl ls-add ls check ovn-nbctl --wait=sb add Logical-Switch ls other_config vlan-passthru=true ln_port_name=ln-100 -ovn-nbctl lsp-add ls $ln_port_name "" 100 -ovn-nbctl lsp-set-addresses $ln_port_name unknown -ovn-nbctl lsp-set-type $ln_port_name localnet -ovn-nbctl lsp-set-options $ln_port_name network_name=phys-100 +check ovn-nbctl lsp-add ls $ln_port_name "" 100 +check ovn-nbctl lsp-set-addresses $ln_port_name unknown +check ovn-nbctl lsp-set-type $ln_port_name localnet +check ovn-nbctl lsp-set-options $ln_port_name network_name=phys-100 net_add n-100 # two hypervisors, each connected to the same network @@ -4057,10 +4057,10 @@ check ovn-nbctl ls-add ls check ovn-nbctl --wait=sb add Logical-Switch ls other_config vlan-passthru=true ln_port_name=ln-100 -ovn-nbctl lsp-add ls $ln_port_name "" 100 -ovn-nbctl lsp-set-addresses $ln_port_name unknown -ovn-nbctl lsp-set-type $ln_port_name localnet -ovn-nbctl lsp-set-options $ln_port_name network_name=phys-100 ethtype=$ethtype +check ovn-nbctl lsp-add ls $ln_port_name "" 100 +check ovn-nbctl lsp-set-addresses $ln_port_name unknown +check ovn-nbctl lsp-set-type $ln_port_name localnet +check ovn-nbctl lsp-set-options $ln_port_name network_name=phys-100 ethtype=$ethtype net_add n-100 # two hypervisors, each connected to the same network @@ -4143,10 +4143,10 @@ check ovn-nbctl ls-add ls check ovn-nbctl --wait=sb add Logical-Switch ls other_config vlan-passthru=true ln_port_name=ln -ovn-nbctl lsp-add ls $ln_port_name -ovn-nbctl lsp-set-addresses $ln_port_name unknown -ovn-nbctl lsp-set-type $ln_port_name localnet -ovn-nbctl lsp-set-options $ln_port_name network_name=phys +check ovn-nbctl lsp-add ls $ln_port_name +check ovn-nbctl lsp-set-addresses $ln_port_name unknown +check ovn-nbctl lsp-set-type $ln_port_name localnet +check ovn-nbctl lsp-set-options $ln_port_name network_name=phys net_add n # two hypervisors, each connected to the same network @@ -4362,7 +4362,7 @@ ovn_start # located on chassis plugged to different physical networks. # create the single switch with two locanet ports -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 for tag in 10 20; do ln_port_name=ln-$tag ovn-nbctl lsp-add ls1 $ln_port_name "" $tag @@ -4401,7 +4401,7 @@ for tag in 10 20; do done done wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-sbctl dump-flows for tag in 10 20; do @@ -4476,36 +4476,36 @@ AT_SKIP_IF([test $HAVE_SCAPY = no]) ovn_start # Configure the Northbound database -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 -ovn-nbctl lsp-add lsw0 lp1 -ovn-nbctl lsp-set-addresses lp1 'f0:00:00:00:00:01 192.168.1.24' +check ovn-nbctl lsp-add lsw0 lp1 +check ovn-nbctl lsp-set-addresses lp1 'f0:00:00:00:00:01 192.168.1.24' -ovn-nbctl lsp-add lsw0 lp2 -ovn-nbctl lsp-set-addresses lp2 f0:00:00:00:00:02 +check ovn-nbctl lsp-add lsw0 lp2 +check ovn-nbctl lsp-set-addresses lp2 f0:00:00:00:00:02 -ovn-nbctl lsp-add lsw0 lp-vtep -ovn-nbctl lsp-set-type lp-vtep vtep -ovn-nbctl lsp-set-options lp-vtep vtep-physical-switch=br-vtep vtep-logical-switch=lsw0 -ovn-nbctl lsp-set-addresses lp-vtep unknown +check ovn-nbctl lsp-add lsw0 lp-vtep +check ovn-nbctl lsp-set-type lp-vtep vtep +check ovn-nbctl lsp-set-options lp-vtep vtep-physical-switch=br-vtep vtep-logical-switch=lsw0 +check ovn-nbctl lsp-set-addresses lp-vtep unknown # lpr, lr and lrp1 are used for the ARP request handling test only. -ovn-nbctl lsp-add lsw0 lpr -ovn-nbctl lr-add lr -ovn-nbctl lrp-add lr lrp1 f0:00:00:00:00:f1 192.168.1.1/24 -ovn-nbctl set Logical_Switch_Port lpr \ +check ovn-nbctl lsp-add lsw0 lpr +check ovn-nbctl lr-add lr +check ovn-nbctl lrp-add lr lrp1 f0:00:00:00:00:f1 192.168.1.1/24 +check ovn-nbctl set Logical_Switch_Port lpr \ type=router \ options:router-port=lrp1 \ addresses=router -ovn-nbctl lrp-set-gateway-chassis lrp1 hv1 +check ovn-nbctl lrp-set-gateway-chassis lrp1 hv1 -ovn-nbctl lsp-add lsw0 lpr2 -ovn-nbctl lrp-add lr lrp2 f0:00:00:00:00:f2 192.168.1.254/24 -ovn-nbctl set Logical_Switch_Port lpr2 \ +check ovn-nbctl lsp-add lsw0 lpr2 +check ovn-nbctl lrp-add lr lrp2 f0:00:00:00:00:f2 192.168.1.254/24 +check ovn-nbctl set Logical_Switch_Port lpr2 \ type=router \ options:router-port=lrp2 \ addresses=router -ovn-nbctl lrp-set-gateway-chassis lrp2 hv1 +check ovn-nbctl lrp-set-gateway-chassis lrp2 hv1 net_add n1 # Network to connect hv1, hv2, and vtep net_add n2 # Network to connect vtep and hv3 @@ -4810,18 +4810,18 @@ AT_SETUP([3 HVs, 1 VIFs/HV, 1 software GW, 1 LS]) ovn_start # Configure the Northbound database -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 -ovn-nbctl lsp-add lsw0 lp1 -ovn-nbctl lsp-set-addresses lp1 f0:00:00:00:00:01 +check ovn-nbctl lsp-add lsw0 lp1 +check ovn-nbctl lsp-set-addresses lp1 f0:00:00:00:00:01 -ovn-nbctl lsp-add lsw0 lp2 -ovn-nbctl lsp-set-addresses lp2 f0:00:00:00:00:02 +check ovn-nbctl lsp-add lsw0 lp2 +check ovn-nbctl lsp-set-addresses lp2 f0:00:00:00:00:02 -ovn-nbctl lsp-add lsw0 lp-gw -ovn-nbctl lsp-set-type lp-gw l2gateway -ovn-nbctl lsp-set-options lp-gw network_name=physnet1 l2gateway-chassis=hv_gw -ovn-nbctl lsp-set-addresses lp-gw unknown +check ovn-nbctl lsp-add lsw0 lp-gw +check ovn-nbctl lsp-set-type lp-gw l2gateway +check ovn-nbctl lsp-set-options lp-gw network_name=physnet1 l2gateway-chassis=hv_gw +check ovn-nbctl lsp-set-addresses lp-gw unknown net_add n1 # Network to connect hv1, hv2, and gw net_add n2 # Network to connect gw and hv3 @@ -5000,7 +5000,7 @@ for i in 1 2 3; do done done -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 for i in 1 2 3; do for j in 1 2 3; do ovn-nbctl lrp-add lr0 lrp$i$j 00:00:00:00:ff:$i$j 192.168.$i$j.254/24 @@ -5012,7 +5012,7 @@ for i in 1 2 3; do done done -ovn-nbctl set Logical_Switch_Port lrp33-attachment \ +check ovn-nbctl set Logical_Switch_Port lrp33-attachment \ addresses='"00:00:00:00:ff:33 192.168.33.254"' # Physical network: @@ -5421,7 +5421,7 @@ ovn_start # There is a secondary IP 192.168.1.100 that is unknown in NB and learned # through ARP only, and it can move between lp11 and lp12. # -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 for i in 1 2 ; do ovn-nbctl ls-add ls$i ovn-nbctl lrp-add lr0 lrp$i 00:00:00:00:ff:0$i 192.168.$i.1/24 @@ -5585,7 +5585,7 @@ spa6="fe80::abcd:1" # When always_learn_from_arp_request=false, the new mac-binding will not be learned # through GARP request. -ovn-nbctl --wait=hv set logical_router lr0 options:always_learn_from_arp_request=false +check ovn-nbctl --wait=hv set logical_router lr0 options:always_learn_from_arp_request=false test_arp 11 $sha $spa test_na 11 $sha $spa6 @@ -5594,13 +5594,13 @@ check_row_count MAC_Binding 0 ip="$spa" check_row_count MAC_Binding 0 ip=\"$spa6\" # When always_learn_from_arp_request=true, the new mac-binding will be learned. -ovn-nbctl --wait=hv set logical_router lr0 options:always_learn_from_arp_request=true +check ovn-nbctl --wait=hv set logical_router lr0 options:always_learn_from_arp_request=true test_arp 11 $sha $spa test_na 11 $sha $spa6 wait_row_count MAC_Binding 1 ip="$spa" mac=\"$sha\" wait_row_count MAC_Binding 1 ip=\"$spa6\" mac=\"$sha\" -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Send an IP packet from lp21 to 192.168.1.100, which should go to lp11. @@ -5614,14 +5614,14 @@ test_ip 21 $smac $dmac $sip $dip 11 # Even when always_learn_from_arp_request=false, the existing mac-binding should be # updated through GARP request. -ovn-nbctl --wait=hv set logical_router lr0 options:always_learn_from_arp_request=false +check ovn-nbctl --wait=hv set logical_router lr0 options:always_learn_from_arp_request=false sha="f0:00:00:00:00:12" test_arp 12 $sha $spa test_na 11 $sha $spa6 wait_row_count MAC_Binding 1 ip="$spa" mac=\"$sha\" wait_row_count MAC_Binding 1 ip=\"$spa6\" mac=\"$sha\" -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # give to the hv the time to send queued ip packets sleep 1 @@ -5674,7 +5674,7 @@ ovn_start # Turn on l2 port security on vifs vif[123]2 # Turn of l2 and l3 port security on vifs vif[123]3 # Make vif13, vif2[23], vif3[123] destinations for unknown MACs. -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 net_add n1 for i in 1 2 3; do sim_add hv$i @@ -5974,7 +5974,7 @@ for i in 1 2 3; do done # configure lsp13 to send and received IPv4 packets with an address range -ovn-nbctl --wait=hv lsp-set-port-security lp13 "f0:00:00:00:00:13 192.168.0.13 20.0.0.4/24 10.0.0.0/24 4242::/64" +check ovn-nbctl --wait=hv lsp-set-port-security lp13 "f0:00:00:00:00:13 192.168.0.13 20.0.0.4/24 10.0.0.0/24 4242::/64" sip=10.0.0.13 tip=192.168.0.22 @@ -6090,37 +6090,37 @@ ls2_lp1_mac="f0:00:00:01:02:04" ls1_lp1_ip="192.168.1.2" ls2_lp1_ip="172.16.1.2" -ovn-nbctl lr-add R1 -ovn-nbctl lr-add R2 +check ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R2 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 $rp_ls1_mac 192.168.1.1/24 +check ovn-nbctl lrp-add R1 ls1 $rp_ls1_mac 192.168.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ options:router-port=ls1 addresses=\"$rp_ls1_mac\" # Connect ls2 to R2 -ovn-nbctl lrp-add R2 ls2 $rp_ls2_mac 172.16.1.1/24 +check ovn-nbctl lrp-add R2 ls2 $rp_ls2_mac 172.16.1.1/24 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ options:router-port=ls2 addresses=\"$rp_ls2_mac\" # Connect R1 to R2 -ovn-nbctl lrp-add R1 R1_R2 00:00:00:02:03:04 20.0.0.1/24 peer=R2_R1 -ovn-nbctl lrp-add R2 R2_R1 00:00:00:02:03:05 20.0.0.2/24 peer=R1_R2 +check ovn-nbctl lrp-add R1 R1_R2 00:00:00:02:03:04 20.0.0.1/24 peer=R2_R1 +check ovn-nbctl lrp-add R2 R2_R1 00:00:00:02:03:05 20.0.0.2/24 peer=R1_R2 -ovn-nbctl lr-route-add R1 "0.0.0.0/0" 20.0.0.2 -ovn-nbctl lr-route-add R2 "0.0.0.0/0" 20.0.0.1 +check ovn-nbctl lr-route-add R1 "0.0.0.0/0" 20.0.0.2 +check ovn-nbctl lr-route-add R2 "0.0.0.0/0" 20.0.0.1 # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "$ls1_lp1_mac $ls1_lp1_ip" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "$ls2_lp1_mac $ls2_lp1_ip" # Create two hypervisor and create OVS ports corresponding to logical ports. @@ -6198,7 +6198,7 @@ grep "reg0 == 172.16.1.2" | wc -l], [0], [1 ]) # Disable the ls2-lp1 port. -ovn-nbctl --wait=hv set logical_switch_port ls2-lp1 enabled=false +check ovn-nbctl --wait=hv set logical_switch_port ls2-lp1 enabled=false AT_CHECK([ovn-sbctl dump-flows | grep lr_in_arp_resolve | \ grep "reg0 == 172.16.1.2" | wc -l], [0], [0 @@ -6229,21 +6229,21 @@ ovn_start # One LR - R1 has switch ls1 with two subnets attached to it (191.168.1.0/24 # and 172.16.1.0/24) connected to it. -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 172.16.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ +check ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 172.16.1.1/24 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ options:router-port=ls1 addresses=\"00:00:00:01:02:03\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port ls1-lp2 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp2 \ +check ovn-nbctl lsp-add ls1 ls1-lp2 \ -- lsp-set-addresses ls1-lp2 "f0:00:00:01:02:04 172.16.1.2" # Create one hypervisor and create OVS ports corresponding to logical ports. @@ -6301,7 +6301,7 @@ as hv1 ovs-ofctl dump-flows br-int #Disable router R1 -ovn-nbctl --wait=hv set Logical_Router R1 enabled=false +check ovn-nbctl --wait=hv set Logical_Router R1 enabled=false echo "---------SB dump-----" ovn-sbctl list datapath_binding @@ -6339,27 +6339,27 @@ ovn_start # One LR - R1 has switch ls1 (191.168.1.0/24) connected to it, # and has switch ls2 (172.16.1.0/24) connected to it. -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ +check ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ options:router-port=ls1 addresses=\"00:00:00:01:02:03\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:04 172.16.1.1/24 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ +check ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:04 172.16.1.1/24 +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ options:router-port=ls2 addresses=\"00:00:00:01:02:04\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "f0:00:00:01:02:04 172.16.1.2" # Create one hypervisor and create OVS ports corresponding to logical ports. @@ -6400,7 +6400,7 @@ packet=$(fmt_pkt "Ether(dst='${dst_mac}', src='${src_mac}')/ \ as hv1 ovs-appctl netdev-dummy/receive vif1 $packet #Disable router R1 -ovn-nbctl --wait=hv set Logical_Router R1 enabled=false +check ovn-nbctl --wait=hv set Logical_Router R1 enabled=false ovn-sbctl dump-flows > sbflows2 AT_CAPTURE_FILE([sbflows2]) @@ -6432,47 +6432,47 @@ ovn_start # connected to it. # R2 has alice (172.16.1.0/24) and bob (172.16.2.0/24) connected to it. -ovn-nbctl lr-add R1 -ovn-nbctl lr-add R2 +check ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R2 -ovn-nbctl ls-add foo -ovn-nbctl ls-add alice -ovn-nbctl ls-add bob +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add alice +check ovn-nbctl ls-add bob # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ +check ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ options:router-port=foo addresses=\"00:00:00:01:02:03\" # Connect alice to R2 -ovn-nbctl lrp-add R2 alice 00:00:00:01:02:04 172.16.1.1/24 -ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ +check ovn-nbctl lrp-add R2 alice 00:00:00:01:02:04 172.16.1.1/24 +check ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ type=router options:router-port=alice addresses=\"00:00:00:01:02:04\" # Connect bob to R2 -ovn-nbctl lrp-add R2 bob 00:00:00:01:02:05 172.16.2.1/24 -ovn-nbctl lsp-add bob rp-bob -- set Logical_Switch_Port rp-bob type=router \ +check ovn-nbctl lrp-add R2 bob 00:00:00:01:02:05 172.16.2.1/24 +check ovn-nbctl lsp-add bob rp-bob -- set Logical_Switch_Port rp-bob type=router \ options:router-port=bob addresses=\"00:00:00:01:02:05\" # Connect R1 to R2 -ovn-nbctl lrp-add R1 R1_R2 00:00:00:02:03:04 20.0.0.1/24 peer=R2_R1 -ovn-nbctl lrp-add R2 R2_R1 00:00:00:02:03:05 20.0.0.2/24 peer=R1_R2 +check ovn-nbctl lrp-add R1 R1_R2 00:00:00:02:03:04 20.0.0.1/24 peer=R2_R1 +check ovn-nbctl lrp-add R2 R2_R1 00:00:00:02:03:05 20.0.0.2/24 peer=R1_R2 #install static routes -ovn-nbctl lr-route-add R1 172.16.1.0/24 20.0.0.2 -ovn-nbctl lr-route-add R2 172.16.2.0/24 20.0.0.2 R1_R2 -ovn-nbctl lr-route-add R2 192.168.1.0/24 20.0.0.1 +check ovn-nbctl lr-route-add R1 172.16.1.0/24 20.0.0.2 +check ovn-nbctl lr-route-add R2 172.16.2.0/24 20.0.0.2 R1_R2 +check ovn-nbctl lr-route-add R2 192.168.1.0/24 20.0.0.1 # Create logical port foo1 in foo -ovn-nbctl lsp-add foo foo1 \ +check ovn-nbctl lsp-add foo foo1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port alice1 in alice -ovn-nbctl lsp-add alice alice1 \ +check ovn-nbctl lsp-add alice alice1 \ -- lsp-set-addresses alice1 "f0:00:00:01:02:04 172.16.1.2" # Create logical port bob1 in bob -ovn-nbctl lsp-add bob bob1 \ +check ovn-nbctl lsp-add bob bob1 \ -- lsp-set-addresses bob1 "f0:00:00:01:02:05 172.16.2.2" # Create two hypervisor and create OVS ports corresponding to logical ports. @@ -6567,7 +6567,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD([ AT_SETUP([send gratuitous arp on localnet]) ovn_start -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 net_add n1 sim_add hv as hv @@ -6635,65 +6635,65 @@ ovn_start # connected to it. R2 has alice (172.16.1.0/24) and R3 has bob (10.32.1.0/24) # connected to it. -ovn-nbctl lr-add R1 -ovn-nbctl lr-add R2 -ovn-nbctl lr-add R3 +check ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R2 +check ovn-nbctl lr-add R3 -ovn-nbctl ls-add foo -ovn-nbctl ls-add alice -ovn-nbctl ls-add bob -ovn-nbctl ls-add join +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add alice +check ovn-nbctl ls-add bob +check ovn-nbctl ls-add join # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ +check ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ options:router-port=foo addresses=\"00:00:01:01:02:03\" # Connect alice to R2 -ovn-nbctl lrp-add R2 alice 00:00:02:01:02:03 172.16.1.1/24 -ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ +check ovn-nbctl lrp-add R2 alice 00:00:02:01:02:03 172.16.1.1/24 +check ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ type=router options:router-port=alice addresses=\"00:00:02:01:02:03\" # Connect bob to R3 -ovn-nbctl lrp-add R3 bob 00:00:03:01:02:03 10.32.1.1/24 -ovn-nbctl lsp-add bob rp-bob -- set Logical_Switch_Port rp-bob \ +check ovn-nbctl lrp-add R3 bob 00:00:03:01:02:03 10.32.1.1/24 +check ovn-nbctl lsp-add bob rp-bob -- set Logical_Switch_Port rp-bob \ type=router options:router-port=bob addresses=\"00:00:03:01:02:03\" # Connect R1 to join -ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24 -ovn-nbctl lsp-add join r1-join -- set Logical_Switch_Port r1-join \ +check ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24 +check ovn-nbctl lsp-add join r1-join -- set Logical_Switch_Port r1-join \ type=router options:router-port=R1_join addresses='"00:00:04:01:02:03"' # Connect R2 to join -ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 -ovn-nbctl lsp-add join r2-join -- set Logical_Switch_Port r2-join \ +check ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 +check ovn-nbctl lsp-add join r2-join -- set Logical_Switch_Port r2-join \ type=router options:router-port=R2_join addresses='"00:00:04:01:02:04"' # Connect R3 to join -ovn-nbctl lrp-add R3 R3_join 00:00:04:01:02:05 20.0.0.3/24 -ovn-nbctl lsp-add join r3-join -- set Logical_Switch_Port r3-join \ +check ovn-nbctl lrp-add R3 R3_join 00:00:04:01:02:05 20.0.0.3/24 +check ovn-nbctl lsp-add join r3-join -- set Logical_Switch_Port r3-join \ type=router options:router-port=R3_join addresses='"00:00:04:01:02:05"' #install static routes -ovn-nbctl lr-route-add R1 172.16.1.0/24 20.0.0.2 -ovn-nbctl lr-route-add R1 10.32.1.0/24 20.0.0.3 +check ovn-nbctl lr-route-add R1 172.16.1.0/24 20.0.0.2 +check ovn-nbctl lr-route-add R1 10.32.1.0/24 20.0.0.3 -ovn-nbctl lr-route-add R2 192.168.1.0/24 20.0.0.1 -ovn-nbctl lr-route-add R2 10.32.1.0/24 20.0.0.3 +check ovn-nbctl lr-route-add R2 192.168.1.0/24 20.0.0.1 +check ovn-nbctl lr-route-add R2 10.32.1.0/24 20.0.0.3 -ovn-nbctl lr-route-add R3 192.168.1.0/24 20.0.0.1 -ovn-nbctl lr-route-add R3 172.16.1.0/24 20.0.0.2 +check ovn-nbctl lr-route-add R3 192.168.1.0/24 20.0.0.1 +check ovn-nbctl lr-route-add R3 172.16.1.0/24 20.0.0.2 # Create logical port foo1 in foo -ovn-nbctl lsp-add foo foo1 \ +check ovn-nbctl lsp-add foo foo1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port alice1 in alice -ovn-nbctl lsp-add alice alice1 \ +check ovn-nbctl lsp-add alice alice1 \ -- lsp-set-addresses alice1 "f0:00:00:01:02:04 172.16.1.2" # Create logical port bob1 in bob -ovn-nbctl lsp-add bob bob1 \ +check ovn-nbctl lsp-add bob bob1 \ -- lsp-set-addresses bob1 "f0:00:00:01:02:05 10.32.1.2" # Create two hypervisor and create OVS ports corresponding to logical ports. @@ -7341,7 +7341,7 @@ rm -f 2.expected # Set tftp server option (IPv4 address) for ls1 echo "------ Set tftp server (IPv4 address) --------" -ovn-nbctl --wait=hv dhcp-options-set-options $d1 server_id=10.0.0.1 \ +check ovn-nbctl --wait=hv dhcp-options-set-options $d1 server_id=10.0.0.1 \ server_mac=ff:10:00:00:00:01 lease_time=3600 router=10.0.0.1 \ tftp_server=10.10.10.10 AT_CAPTURE_FILE([sbflows3]) @@ -7367,7 +7367,7 @@ rm -f 2.expected # Set tftp server option (Hostname) for ls1 echo "------ Set tftp server (hostname) --------" -ovn-nbctl --wait=hv dhcp-options-set-options $d1 server_id=10.0.0.1 \ +check ovn-nbctl --wait=hv dhcp-options-set-options $d1 server_id=10.0.0.1 \ server_mac=ff:10:00:00:00:01 lease_time=3600 router=10.0.0.1 \ tftp_server=\"test_tftp_server\" AT_CAPTURE_FILE([sbflows4]) @@ -7393,7 +7393,7 @@ rm -f 2.expected # Set domain search list option for ls1 echo "------ Set domain search list --------" -ovn-nbctl --wait=hv dhcp-options-set-options $d1 server_id=10.0.0.1 \ +check ovn-nbctl --wait=hv dhcp-options-set-options $d1 server_id=10.0.0.1 \ server_mac=ff:10:00:00:00:01 lease_time=3600 router=10.0.0.1 \ domain_search_list=\"test1.com,test2.com\" AT_CAPTURE_FILE([sbflows5]) @@ -7430,16 +7430,16 @@ reset_pcap_file hv1-vif2 hv1/vif2 rm -f 1.expected rm -f 2.expected -ovn-nbctl --all destroy dhcp-option +check ovn-nbctl --all destroy dhcp-option ovn-nbctl dhcp-options-create 10.0.0.0/24 d3=$(ovn-nbctl --bare --columns=_uuid find dhcp_options cidr="10.0.0.0/24") -ovn-nbctl dhcp-options-set-options $d3 \ +check ovn-nbctl dhcp-options-set-options $d3 \ server_id=10.0.0.1 server_mac=ff:10:00:00:00:01 \ lease_time=3600 router=10.0.0.1 bootfile_name_alt=\"bootfile_name_alt\" \ bootfile_name=\"bootfile\" -ovn-nbctl --wait=hv lsp-set-dhcpv4-options ls1-lp1 $d3 +check ovn-nbctl --wait=hv lsp-set-dhcpv4-options ls1-lp1 $d3 offer_ip=`ip_to_hex 10 0 0 4` server_ip=`ip_to_hex 10 0 0 1` @@ -7529,40 +7529,40 @@ AT_SETUP([dhcpv6 : 1 HV, 2 LS, 5 LSPs]) AT_SKIP_IF([test $HAVE_SCAPY = no]) ovn_start -ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl ls-add ls1 +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "f0:00:00:00:00:01 10.0.0.4 ae70::4" -ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4 ae70::4" +check ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4 ae70::4" -ovn-nbctl lsp-add ls1 ls1-lp2 \ +check ovn-nbctl lsp-add ls1 ls1-lp2 \ -- lsp-set-addresses ls1-lp2 "f0:00:00:00:00:02 ae70::5" -ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 ae70::5" +check ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 ae70::5" -ovn-nbctl lsp-add ls1 ls1-lp3 \ +check ovn-nbctl lsp-add ls1 ls1-lp3 \ -- lsp-set-addresses ls1-lp3 "f0:00:00:00:00:22 ae70::22" -ovn-nbctl lsp-set-port-security ls1-lp3 "f0:00:00:00:00:22 ae70::22" +check ovn-nbctl lsp-set-port-security ls1-lp3 "f0:00:00:00:00:22 ae70::22" d1="$(ovn-nbctl create DHCP_Options cidr="ae70\:\:/64" \ options="\"server_id\"=\"00:00:00:10:00:01\"")" -ovn-nbctl lsp-set-dhcpv6-options ls1-lp1 ${d1} -ovn-nbctl lsp-set-dhcpv6-options ls1-lp2 ${d1} +check ovn-nbctl lsp-set-dhcpv6-options ls1-lp1 ${d1} +check ovn-nbctl lsp-set-dhcpv6-options ls1-lp2 ${d1} d2="$(ovn-nbctl create DHCP_Options cidr="ae70\:\:/64" \ options="\"dhcpv6_stateless\"=\"true\" \"server_id\"=\"00:00:00:10:00:01\"")" -ovn-nbctl lsp-set-dhcpv6-options ls1-lp3 ${d2} +check ovn-nbctl lsp-set-dhcpv6-options ls1-lp3 ${d2} -ovn-nbctl ls-add ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl ls-add ls2 +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "f0:00:00:00:00:03 be70::3" -ovn-nbctl lsp-set-port-security ls2-lp1 "f0:00:00:00:00:03 be70::3" -ovn-nbctl lsp-add ls2 ls2-lp2 \ +check ovn-nbctl lsp-set-port-security ls2-lp1 "f0:00:00:00:00:03 be70::3" +check ovn-nbctl lsp-add ls2 ls2-lp2 \ -- lsp-set-addresses ls2-lp2 "f0:00:00:00:00:04 be70::4" -ovn-nbctl lsp-set-port-security ls2-lp2 "f0:00:00:00:00:04 be70::4" +check ovn-nbctl lsp-set-port-security ls2-lp2 "f0:00:00:00:00:04 be70::4" net_add n1 sim_add hv1 @@ -7807,13 +7807,13 @@ reset_pcap_file hv1-vif5 hv1/vif5 test_dhcpv6 5 $src_mac $src_lla 11 1 "" "" 5 check_packets 5 -ovn-nbctl --all destroy dhcp-option +check ovn-nbctl --all destroy dhcp-option d1="$(ovn-nbctl create DHCP_Options cidr="ae70\:\:/64")" -ovn-nbctl dhcp-options-set-options $d1 \ +check ovn-nbctl dhcp-options-set-options $d1 \ server_id=00:00:00:10:00:01 \ bootfile_name_alt=\"bootfile_name_alt\" \ bootfile_name=\"bootfile_name\" -ovn-nbctl --wait=hv lsp-set-dhcpv6-options ls1-lp2 ${d1} +check ovn-nbctl --wait=hv lsp-set-dhcpv6-options ls1-lp2 ${d1} reset_pcap_file hv1-vif2 hv1/vif2 @@ -7839,12 +7839,12 @@ reset_pcap_file hv1-vif2 hv1/vif2 test_dhcpv6_release 2 $src_mac $src_lla $offer_ip check_packets 2 -ovn-nbctl --all destroy dhcp-option +check ovn-nbctl --all destroy dhcp-option d1="$(ovn-nbctl create DHCP_Options cidr="ae70\:\:/64")" -ovn-nbctl dhcp-options-set-options $d1 \ +check ovn-nbctl dhcp-options-set-options $d1 \ server_id=00:00:00:10:00:01 \ fqdn=\"ovn.org\" -ovn-nbctl --wait=hv lsp-set-dhcpv6-options ls1-lp2 ${d1} +check ovn-nbctl --wait=hv lsp-set-dhcpv6-options ls1-lp2 ${d1} reset_pcap_file hv1-vif2 hv1/vif2 @@ -7906,28 +7906,28 @@ OVN_POPULATE_ARP ovn-nbctl create Logical_Router name=R1 ovn-nbctl create Logical_Router name=R2 options:chassis="hv2" -ovn-nbctl ls-add foo -ovn-nbctl ls-add alice -ovn-nbctl ls-add join +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add alice +check ovn-nbctl ls-add join # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo \ +check ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo \ type=router options:router-port=foo addresses=\"00:00:01:01:02:03\" # Connect alice to R2 -ovn-nbctl lrp-add R2 R2-alice 00:00:02:01:02:03 172.16.1.1/24 -ovn-nbctl lsp-add alice alice-R2 -- set Logical_Switch_Port alice-R2 \ +check ovn-nbctl lrp-add R2 R2-alice 00:00:02:01:02:03 172.16.1.1/24 +check ovn-nbctl lsp-add alice alice-R2 -- set Logical_Switch_Port alice-R2 \ type=router options:router-port=R2-alice addresses=\"00:00:02:01:02:03\" # Connect R1 to join -ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24 -ovn-nbctl lsp-add join r1-join -- set Logical_Switch_Port r1-join \ +check ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24 +check ovn-nbctl lsp-add join r1-join -- set Logical_Switch_Port r1-join \ type=router options:router-port=R1_join addresses='"00:00:04:01:02:03"' # Connect R2 to join -ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 -ovn-nbctl lsp-add join r2-join -- set Logical_Switch_Port r2-join \ +check ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 +check ovn-nbctl lsp-add join r2-join -- set Logical_Switch_Port r2-join \ type=router options:router-port=R2_join addresses='"00:00:04:01:02:04"' @@ -7941,11 +7941,11 @@ ip_prefix=192.168.1.0/24 nexthop=20.0.0.1 -- add Logical_Router \ R2 static_routes @lrt # Create logical port foo1 in foo -ovn-nbctl lsp-add foo foo1 \ +check ovn-nbctl lsp-add foo foo1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port alice1 in alice -ovn-nbctl lsp-add alice alice1 \ +check ovn-nbctl lsp-add alice alice1 \ -- lsp-set-addresses alice1 "f0:00:00:01:02:04 172.16.1.2" wait_for_ports_up @@ -8009,12 +8009,12 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) CHECK_FLOWS_AFTER_RECOMPUTE([hv1], [hv1]) # Delete the router and re-create it. Things should work as before. -ovn-nbctl lr-del R2 +check ovn-nbctl lr-del R2 ovn-nbctl create Logical_Router name=R2 options:chassis="hv2" # Connect alice to R2 -ovn-nbctl lrp-add R2 R2-alice 00:00:02:01:02:03 172.16.1.1/24 +check ovn-nbctl lrp-add R2 R2-alice 00:00:02:01:02:03 172.16.1.1/24 # Connect R2 to join -ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 +check ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 ovn-nbctl -- --id=@lrt create Logical_Router_Static_Route \ ip_prefix=192.168.1.0/24 nexthop=20.0.0.1 -- add Logical_Router \ @@ -8055,27 +8055,27 @@ ovn_start # One LR - R1 has switch ls1 (191.168.1.0/24) connected to it, # and has switch ls2 (172.16.1.0/24) connected to it. -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ +check ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ type=router options:router-port=ls1 addresses=\"00:00:00:01:02:f1\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ +check ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ type=router options:router-port=ls2 addresses=\"00:00:00:01:02:f2\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "00:00:00:01:02:03 192.168.1.2" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "00:00:00:01:02:04 172.16.1.2" # Create one hypervisor and create OVS ports corresponding to logical ports. @@ -8185,37 +8185,37 @@ ovn_start # One LR - R1 has switch ls1 (191.168.1.0/24) connected to it, # and has switch ls2 (172.16.1.0/24) connected to it. -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 -ovn-nbctl ls-add ls3 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls3 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ +check ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ type=router options:router-port=ls1 addresses=\"00:00:00:01:02:f1\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ +check ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ type=router options:router-port=ls2 addresses=\"00:00:00:01:02:f2\" # Connect ls3 to R1 -ovn-nbctl lrp-add R1 ls3 00:00:00:01:02:f3 20.20.1.1/24 -ovn-nbctl lsp-add ls3 rp-ls3 -- set Logical_Switch_Port rp-ls3 \ +check ovn-nbctl lrp-add R1 ls3 00:00:00:01:02:f3 20.20.1.1/24 +check ovn-nbctl lsp-add ls3 rp-ls3 -- set Logical_Switch_Port rp-ls3 \ type=router options:router-port=ls3 addresses=\"00:00:00:01:02:f3\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "00:00:00:01:02:03 192.168.1.2" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "00:00:00:01:02:04 172.16.1.2" # Create logical port ls3-lp1 in ls3 -ovn-nbctl lsp-add ls3 ls3-lp1 \ +check ovn-nbctl lsp-add ls3 ls3-lp1 \ -- lsp-set-addresses ls3-lp1 "00:00:00:01:02:05 20.20.1.2" # Create one hypervisor and create OVS ports corresponding to logical ports. @@ -8358,37 +8358,37 @@ ovn_start # One LR - R1 has switch ls1 (191.168.1.0/24) connected to it, # and has switch ls2 (172.16.1.0/24) connected to it. -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 -ovn-nbctl ls-add ls3 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls3 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 2001::1/64 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ +check ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 2001::1/64 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ type=router options:router-port=ls1 addresses=\"00:00:00:01:02:f1\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 2002::1/64 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ +check ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 2002::1/64 +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ type=router options:router-port=ls2 addresses=\"00:00:00:01:02:f2\" # Connect ls3 to R1 -ovn-nbctl lrp-add R1 ls3 00:00:00:01:02:f3 2003::1/64 -ovn-nbctl lsp-add ls3 rp-ls3 -- set Logical_Switch_Port rp-ls3 \ +check ovn-nbctl lrp-add R1 ls3 00:00:00:01:02:f3 2003::1/64 +check ovn-nbctl lsp-add ls3 rp-ls3 -- set Logical_Switch_Port rp-ls3 \ type=router options:router-port=ls3 addresses=\"00:00:00:01:02:f3\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "00:00:00:01:02:03 2001::2" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "00:00:00:01:02:04 2002::2" # Create logical port ls3-lp1 in ls3 -ovn-nbctl lsp-add ls3 ls3-lp1 \ +check ovn-nbctl lsp-add ls3 ls3-lp1 \ -- lsp-set-addresses ls3-lp1 "00:00:00:01:02:05 2003::2" # Create one hypervisor and create OVS ports corresponding to logical ports. @@ -8526,9 +8526,9 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([port state up and down]) ovn_start -ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 lp1 -ovn-nbctl lsp-set-addresses lp1 unknown +check ovn-nbctl ls-add ls1 +check ovn-nbctl lsp-add ls1 lp1 +check ovn-nbctl lsp-set-addresses lp1 unknown net_add n1 sim_add hv1 @@ -8588,9 +8588,9 @@ test_datapath_in_of_rules() { test_datapath_in_of_rules 0 "before ls+port create" -ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 lp1 -ovn-nbctl lsp-set-addresses lp1 unknown +check ovn-nbctl ls-add ls1 +check ovn-nbctl lsp-add ls1 lp1 +check ovn-nbctl lsp-set-addresses lp1 unknown as hv1 ovs-vsctl add-port br-int vif1 -- set Interface vif1 external-ids:iface-id=lp1 OVS_WAIT_UNTIL([test x`ovn-nbctl lsp-get-up lp1` = xup]) @@ -8600,9 +8600,9 @@ test_datapath_in_of_rules 1 "after port is bound" as hv1 ovs-vsctl del-port br-int vif1 OVS_WAIT_UNTIL([test x`ovn-nbctl lsp-get-up lp1` = xdown]) -ovn-nbctl lsp-set-addresses lp1 -ovn-nbctl lsp-del lp1 -ovn-nbctl ls-del ls1 +check ovn-nbctl lsp-set-addresses lp1 +check ovn-nbctl lsp-del lp1 +check ovn-nbctl ls-del ls1 # wait for earlier changes to take effect wait_for_ports_up @@ -8629,7 +8629,7 @@ ovn_start # by local ovn-controller, but not by target VIF. # Create hypervisors and logical switch lsw0. -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 net_add n1 sim_add hv1 as hv1 @@ -8638,20 +8638,20 @@ ovn_attach n1 br-phys 192.168.0.2 # Add vif1 to hv1 and lsw0, turn on l2 port security on vif1. ovs-vsctl add-port br-int vif1 -- set Interface vif1 external-ids:iface-id=lp1 options:tx_pcap=hv1/vif1-tx.pcap options:rxq_pcap=hv1/vif1-rx.pcap ofport-request=1 -ovn-nbctl lsp-add lsw0 lp1 -ovn-nbctl lsp-set-addresses lp1 "fa:16:3e:94:05:98 192.168.0.3 fd81:ce49:a948:0:f816:3eff:fe94:598" -ovn-nbctl lsp-set-port-security lp1 "fa:16:3e:94:05:98 192.168.0.3 fd81:ce49:a948:0:f816:3eff:fe94:598" +check ovn-nbctl lsp-add lsw0 lp1 +check ovn-nbctl lsp-set-addresses lp1 "fa:16:3e:94:05:98 192.168.0.3 fd81:ce49:a948:0:f816:3eff:fe94:598" +check ovn-nbctl lsp-set-port-security lp1 "fa:16:3e:94:05:98 192.168.0.3 fd81:ce49:a948:0:f816:3eff:fe94:598" # Add vif2 to hv1 and lsw0, turn on l2 port security on vif2. ovs-vsctl add-port br-int vif2 -- set Interface vif2 external-ids:iface-id=lp2 options:tx_pcap=hv1/vif2-tx.pcap options:rxq_pcap=hv1/vif2-rx.pcap ofport-request=2 -ovn-nbctl lsp-add lsw0 lp2 -ovn-nbctl lsp-set-addresses lp2 "fa:16:3e:a1:f9:ae 192.168.0.4 fd81:ce49:a948:0:f816:3eff:fea1:f9ae" -ovn-nbctl lsp-set-port-security lp2 "fa:16:3e:a1:f9:ae 192.168.0.4 fd81:ce49:a948:0:f816:3eff:fea1:f9ae" +check ovn-nbctl lsp-add lsw0 lp2 +check ovn-nbctl lsp-set-addresses lp2 "fa:16:3e:a1:f9:ae 192.168.0.4 fd81:ce49:a948:0:f816:3eff:fea1:f9ae" +check ovn-nbctl lsp-set-port-security lp2 "fa:16:3e:a1:f9:ae 192.168.0.4 fd81:ce49:a948:0:f816:3eff:fea1:f9ae" # Add ACL rule for ICMPv6 on lsw0 -ovn-nbctl acl-add lsw0 from-lport 1002 'ip6 && icmp6' allow-related -ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp1" && ip6 && icmp6' allow-related -ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp2" && ip6 && icmp6' allow-related +check ovn-nbctl acl-add lsw0 from-lport 1002 'ip6 && icmp6' allow-related +check ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp1" && ip6 && icmp6' allow-related +check ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp2" && ip6 && icmp6' allow-related # Allow some time for ovn-northd and ovn-controller to catch up. wait_for_ports_up @@ -8694,8 +8694,8 @@ ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 row=`ovn-nbctl create Address_Set name=set1 addresses=\"1.1.1.1\"` -ovn-nbctl set Address_Set $row name=set1 addresses=\"1.1.1.1,1.1.1.2\" -ovn-nbctl --wait=hv destroy Address_Set $row +check ovn-nbctl set Address_Set $row name=set1 addresses=\"1.1.1.1,1.1.1.2\" +check ovn-nbctl --wait=hv destroy Address_Set $row # A bug previously existed in the address set support code # that caused ovn-controller to crash after an address set @@ -8726,9 +8726,9 @@ check_dynamic_addresses() { check ovn-nbctl --wait=sb sync # Add a port to a switch that does not have a subnet set, then set the # subnet which should result in an address being allocated for the port. -ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic +check ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic ovn-nbctl --wait=sb add Logical-Switch sw0 other_config subnet=192.168.1.0/24 check_dynamic_addresses p0 "0a:00:00:a8:01:03 192.168.1.2" @@ -8744,8 +8744,8 @@ done # Trying similar tests with a second switch. MAC addresses should be unique # across both switches but IP's only need to be unique within the same switch. -ovn-nbctl ls-add sw1 -ovn-nbctl lsp-add sw1 p10 -- lsp-set-addresses p10 dynamic +check ovn-nbctl ls-add sw1 +check ovn-nbctl lsp-add sw1 p10 -- lsp-set-addresses p10 dynamic ovn-nbctl --wait=sb add Logical-Switch sw1 other_config subnet=192.168.1.0/24 check_row_count nb:Logical_Switch_Port 1 name=p10 dynamic_addresses='"0a:00:00:a8:01:0d 192.168.1.2"' @@ -8760,8 +8760,8 @@ done # Change a port's address to test for multiple ip's for a single address entry # and addresses set by the user. -ovn-nbctl lsp-set-addresses p0 "0a:00:00:a8:01:17 192.168.1.2 192.168.1.12 192.168.1.14" -ovn-nbctl --wait=sb lsp-add sw0 p20 -- lsp-set-addresses p20 dynamic +check ovn-nbctl lsp-set-addresses p0 "0a:00:00:a8:01:17 192.168.1.2 192.168.1.12 192.168.1.14" +check ovn-nbctl --wait=sb lsp-add sw0 p20 -- lsp-set-addresses p20 dynamic check_dynamic_addresses p20 "0a:00:00:a8:01:18 192.168.1.13" # Test for logical router port address management. @@ -8770,120 +8770,120 @@ ovn-nbctl -- --id=@lrp create Logical_Router_port name=sw0 \ network="192.168.1.1/24" mac=\"0a:00:00:a8:01:19\" \ -- add Logical_Router R1 ports @lrp -- lsp-add sw0 rp-sw0 \ -- set Logical_Switch_Port rp-sw0 type=router options:router-port=sw0 -ovn-nbctl --wait=sb lsp-add sw0 p21 -- lsp-set-addresses p21 dynamic +check ovn-nbctl --wait=sb lsp-add sw0 p21 -- lsp-set-addresses p21 dynamic check_dynamic_addresses p21 "0a:00:00:a8:01:1a 192.168.1.15" # Test for address reuse after logical port is deleted. -ovn-nbctl lsp-del p0 -ovn-nbctl --wait=sb lsp-add sw0 p23 -- lsp-set-addresses p23 dynamic +check ovn-nbctl lsp-del p0 +check ovn-nbctl --wait=sb lsp-add sw0 p23 -- lsp-set-addresses p23 dynamic check_dynamic_addresses p23 "0a:00:00:a8:01:03 192.168.1.2" # Test for multiple addresses to one logical port. -ovn-nbctl lsp-add sw0 p25 -- lsp-set-addresses p25 \ +check ovn-nbctl lsp-add sw0 p25 -- lsp-set-addresses p25 \ "0a:00:00:a8:01:1b 192.168.1.12" "0a:00:00:a8:01:1c 192.168.1.14" -ovn-nbctl --wait=sb lsp-add sw0 p26 -- lsp-set-addresses p26 dynamic +check ovn-nbctl --wait=sb lsp-add sw0 p26 -- lsp-set-addresses p26 dynamic check_dynamic_addresses p26 "0a:00:00:a8:01:17 192.168.1.16" # Test for exhausting subnet address space. -ovn-nbctl ls-add sw2 -- add Logical-Switch sw2 other_config subnet=172.16.1.0/30 -ovn-nbctl --wait=sb lsp-add sw2 p27 -- lsp-set-addresses p27 dynamic +check ovn-nbctl ls-add sw2 -- add Logical-Switch sw2 other_config subnet=172.16.1.0/30 +check ovn-nbctl --wait=sb lsp-add sw2 p27 -- lsp-set-addresses p27 dynamic check_dynamic_addresses p27 "0a:00:00:10:01:03 172.16.1.2" -ovn-nbctl --wait=sb lsp-add sw2 p28 -- lsp-set-addresses p28 dynamic +check ovn-nbctl --wait=sb lsp-add sw2 p28 -- lsp-set-addresses p28 dynamic check_dynamic_addresses p28 "0a:00:00:00:00:01" # Test that address management does not add duplicate MAC for lsp/lrp peers. ovn-nbctl create Logical_Router name=R2 -ovn-nbctl ls-add sw3 -ovn-nbctl lsp-add sw3 p29 -- lsp-set-addresses p29 \ +check ovn-nbctl ls-add sw3 +check ovn-nbctl lsp-add sw3 p29 -- lsp-set-addresses p29 \ "0a:00:00:a8:01:18" ovn-nbctl -- --id=@lrp create Logical_Router_port name=sw3 \ network="192.168.2.1/24" mac=\"0a:00:00:a8:01:18\" \ -- add Logical_Router R2 ports @lrp -- lsp-add sw3 rp-sw3 \ -- set Logical_Switch_Port rp-sw3 type=router options:router-port=sw3 -ovn-nbctl --wait=sb lsp-add sw0 p30 -- lsp-set-addresses p30 dynamic +check ovn-nbctl --wait=sb lsp-add sw0 p30 -- lsp-set-addresses p30 dynamic check_dynamic_addresses p30 "0a:00:00:a8:01:1d 192.168.1.17" # Test static MAC address with dynamically allocated IP -ovn-nbctl --wait=sb lsp-add sw0 p31 -- lsp-set-addresses p31 \ +check ovn-nbctl --wait=sb lsp-add sw0 p31 -- lsp-set-addresses p31 \ "fe:dc:ba:98:76:54 dynamic" check_dynamic_addresses p31 "fe:dc:ba:98:76:54 192.168.1.18" # Update the static MAC address with dynamically allocated IP and check # if the MAC address is updated in 'Logical_Switch_Port.dynamic_adddresses' -ovn-nbctl --wait=sb lsp-set-addresses p31 "fe:dc:ba:98:76:55 dynamic" +check ovn-nbctl --wait=sb lsp-set-addresses p31 "fe:dc:ba:98:76:55 dynamic" check_dynamic_addresses p31 "fe:dc:ba:98:76:55 192.168.1.18" -ovn-nbctl --wait=sb lsp-set-addresses p31 "dynamic" +check ovn-nbctl --wait=sb lsp-set-addresses p31 "dynamic" check_dynamic_addresses p31 "0a:00:00:a8:01:1e 192.168.1.18" -ovn-nbctl --wait=sb lsp-set-addresses p31 "fe:dc:ba:98:76:56 dynamic" +check ovn-nbctl --wait=sb lsp-set-addresses p31 "fe:dc:ba:98:76:56 dynamic" check_dynamic_addresses p31 "fe:dc:ba:98:76:56 192.168.1.18" # Test the exclude_ips from the IPAM list -ovn-nbctl --wait=sb set logical_switch sw0 \ +check ovn-nbctl --wait=sb set logical_switch sw0 \ other_config:exclude_ips="192.168.1.19 192.168.1.21 192.168.1.23..192.168.1.50" -ovn-nbctl --wait=sb lsp-add sw0 p32 -- lsp-set-addresses p32 "dynamic" +check ovn-nbctl --wait=sb lsp-add sw0 p32 -- lsp-set-addresses p32 "dynamic" # 192.168.1.20 should be assigned as 192.168.1.19 is excluded. check_dynamic_addresses p32 "0a:00:00:a8:01:1e 192.168.1.20" -ovn-nbctl --wait=sb lsp-add sw0 p33 -- lsp-set-addresses p33 \ +check ovn-nbctl --wait=sb lsp-add sw0 p33 -- lsp-set-addresses p33 \ "dynamic" # 192.168.1.22 should be assigned as 192.168.1.21 is excluded. check_dynamic_addresses p33 "0a:00:00:a8:01:1f 192.168.1.22" -ovn-nbctl --wait=sb lsp-add sw0 p34 -- lsp-set-addresses p34 \ +check ovn-nbctl --wait=sb lsp-add sw0 p34 -- lsp-set-addresses p34 \ "dynamic" # 192.168.1.51 should be assigned as 192.168.1.23-192.168.1.50 is excluded. check_dynamic_addresses p34 "0a:00:00:a8:01:34 192.168.1.51" # Now clear the exclude_ips list. 192.168.1.19 should be assigned. -ovn-nbctl --wait=sb set Logical-switch sw0 other_config:exclude_ips="invalid" -ovn-nbctl --wait=sb lsp-add sw0 p35 -- lsp-set-addresses p35 "dynamic" +check ovn-nbctl --wait=sb set Logical-switch sw0 other_config:exclude_ips="invalid" +check ovn-nbctl --wait=sb lsp-add sw0 p35 -- lsp-set-addresses p35 "dynamic" check_dynamic_addresses p35 "0a:00:00:a8:01:20 192.168.1.19" # Set invalid data in exclude_ips list. It should be ignored. -ovn-nbctl --wait=sb set Logical-switch sw0 other_config:exclude_ips="182.168.1.30" -ovn-nbctl --wait=sb lsp-add sw0 p36 -- lsp-set-addresses p36 \ +check ovn-nbctl --wait=sb set Logical-switch sw0 other_config:exclude_ips="182.168.1.30" +check ovn-nbctl --wait=sb lsp-add sw0 p36 -- lsp-set-addresses p36 \ "dynamic" # 192.168.1.21 should be assigned as that's the next free one. check_dynamic_addresses p36 "0a:00:00:a8:01:21 192.168.1.21" # Clear the dynamic addresses assignment request. -ovn-nbctl --wait=sb clear logical_switch_port p36 addresses +check ovn-nbctl --wait=sb clear logical_switch_port p36 addresses check_dynamic_addresses p36 # Set IPv6 prefix -ovn-nbctl --wait=sb set Logical-switch sw0 other_config:ipv6_prefix="aef0::" -ovn-nbctl --wait=sb lsp-add sw0 p37 -- lsp-set-addresses p37 "dynamic" +check ovn-nbctl --wait=sb set Logical-switch sw0 other_config:ipv6_prefix="aef0::" +check ovn-nbctl --wait=sb lsp-add sw0 p37 -- lsp-set-addresses p37 "dynamic" # With prefix aef0 and mac 0a:00:00:00:00:26, the dynamic IPv6 should be # - aef0::800:ff:fe00:26 (EUI64) check_dynamic_addresses p37 "0a:00:00:a8:01:21 192.168.1.21 aef0::800:ff:fea8:121" -ovn-nbctl --wait=sb ls-add sw4 -ovn-nbctl --wait=sb set Logical-switch sw4 other_config:ipv6_prefix="bef0::" \ +check ovn-nbctl --wait=sb ls-add sw4 +check ovn-nbctl --wait=sb set Logical-switch sw4 other_config:ipv6_prefix="bef0::" \ -- set Logical-switch sw4 other_config:subnet=192.168.2.0/30 -ovn-nbctl --wait=sb lsp-add sw4 p38 -- lsp-set-addresses p38 "dynamic" +check ovn-nbctl --wait=sb lsp-add sw4 p38 -- lsp-set-addresses p38 "dynamic" check_dynamic_addresses p38 "0a:00:00:a8:02:03 192.168.2.2 bef0::800:ff:fea8:203" -ovn-nbctl --wait=sb lsp-add sw4 p39 -- lsp-set-addresses p39 \ +check ovn-nbctl --wait=sb lsp-add sw4 p39 -- lsp-set-addresses p39 \ "f0:00:00:00:10:12 dynamic" check_dynamic_addresses p39 "f0:00:00:00:10:12 bef0::f200:ff:fe00:1012" # Test the case where IPv4 addresses are exhausted and IPv6 prefix is set # p40 should not have an IPv4 address since the pool is exhausted -ovn-nbctl --wait=sb lsp-add sw4 p40 -- lsp-set-addresses p40 \ +check ovn-nbctl --wait=sb lsp-add sw4 p40 -- lsp-set-addresses p40 \ "dynamic" check_dynamic_addresses p40 "0a:00:00:00:00:02 bef0::800:ff:fe00:2" # Test dynamic changes on switch ports. # -ovn-nbctl --wait=sb ls-add sw5 -ovn-nbctl --wait=sb lsp-add sw5 p41 -- lsp-set-addresses p41 \ +check ovn-nbctl --wait=sb ls-add sw5 +check ovn-nbctl --wait=sb lsp-add sw5 p41 -- lsp-set-addresses p41 \ "dynamic" # p41 will start with nothing check_dynamic_addresses p41 '' @@ -8893,23 +8893,23 @@ ovn-nbctl --wait=sb add Logical-Switch sw5 other_config subnet=192.168.1.0/24 check_dynamic_addresses p41 "0a:00:00:a8:01:22 192.168.1.2" # Clear the other_config. The IPv4 address should be gone -ovn-nbctl --wait=sb clear Logical-Switch sw5 other_config +check ovn-nbctl --wait=sb clear Logical-Switch sw5 other_config check_dynamic_addresses p41 '' # Set an IPv6 prefix. Now p41 should have an IPv6 address. -ovn-nbctl --wait=sb set Logical-Switch sw5 other_config:ipv6_prefix="aef0::" +check ovn-nbctl --wait=sb set Logical-Switch sw5 other_config:ipv6_prefix="aef0::" check_dynamic_addresses p41 "0a:00:00:00:00:03 aef0::800:ff:fe00:3" # Change the MAC address to a static one. The IPv6 address should update. -ovn-nbctl --wait=sb lsp-set-addresses p41 "f0:00:00:00:10:2b dynamic" +check ovn-nbctl --wait=sb lsp-set-addresses p41 "f0:00:00:00:10:2b dynamic" check_dynamic_addresses p41 "f0:00:00:00:10:2b aef0::f200:ff:fe00:102b" # Change the IPv6 prefix. The IPv6 address should update. -ovn-nbctl --wait=sb set Logical-Switch sw5 other_config:ipv6_prefix="bef0::" +check ovn-nbctl --wait=sb set Logical-Switch sw5 other_config:ipv6_prefix="bef0::" check_dynamic_addresses p41 "f0:00:00:00:10:2b bef0::f200:ff:fe00:102b" # Clear the other_config. The IPv6 address should be gone -ovn-nbctl --wait=sb clear Logical-Switch sw5 other_config +check ovn-nbctl --wait=sb clear Logical-Switch sw5 other_config check_dynamic_addresses p41 '' # Set the subnet again. Now p41 should get the IPv4 address again. @@ -8922,17 +8922,17 @@ exclude_ips="192.168.1.2" check_dynamic_addresses p41 "f0:00:00:00:10:2b 192.168.1.3" # Add static ip address -ovn-nbctl --wait=sb lsp-set-addresses p41 "dynamic 192.168.1.100" +check ovn-nbctl --wait=sb lsp-set-addresses p41 "dynamic 192.168.1.100" ovn-nbctl list Logical-Switch-Port p41 -ovn-nbctl --wait=sb lsp-add sw5 p42 -- lsp-set-addresses p42 \ +check ovn-nbctl --wait=sb lsp-add sw5 p42 -- lsp-set-addresses p42 \ "dynamic 192.168.1.101" check_dynamic_addresses p41 "0a:00:00:a8:01:65 192.168.1.100" check_dynamic_addresses p42 "0a:00:00:a8:01:66 192.168.1.101" # define a mac address prefix -ovn-nbctl ls-add sw6 -ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="00:11:22:33:44:55" -ovn-nbctl --wait=sb set Logical-Switch sw6 other_config:subnet=192.168.100.0/24 +check ovn-nbctl ls-add sw6 +check ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="00:11:22:33:44:55" +check ovn-nbctl --wait=sb set Logical-Switch sw6 other_config:subnet=192.168.100.0/24 for n in $(seq 1 3); do ovn-nbctl --wait=sb lsp-add sw6 "p5$n" -- lsp-set-addresses "p5$n" dynamic done @@ -8941,11 +8941,11 @@ check_dynamic_addresses p52 "00:11:22:a8:64:04 192.168.100.3" check_dynamic_addresses p53 "00:11:22:a8:64:05 192.168.100.4" # verify configuration order does not break IPAM/MACAM -ovn-nbctl ls-add sw7 +check ovn-nbctl ls-add sw7 for n in $(seq 1 3); do ovn-nbctl --wait=sb lsp-add sw7 "p7$n" -- lsp-set-addresses "p7$n" dynamic done -ovn-nbctl --wait=sb set Logical-Switch sw7 other_config:ipv6_prefix="bef0::" +check ovn-nbctl --wait=sb set Logical-Switch sw7 other_config:ipv6_prefix="bef0::" p71_addr=$(ovn-nbctl get Logical-Switch-Port p71 dynamic_addresses) p72_addr=$(ovn-nbctl get Logical-Switch-Port p72 dynamic_addresses) p73_addr=$(ovn-nbctl get Logical-Switch-Port p73 dynamic_addresses) @@ -8955,8 +8955,8 @@ AT_CHECK([test "$p72_addr" != "$p73_addr"], [0], []) # request to assign mac only # -ovn-nbctl ls-add sw8 -ovn-nbctl --wait=sb set Logical-Switch sw8 other_config:mac_only=true +check ovn-nbctl ls-add sw8 +check ovn-nbctl --wait=sb set Logical-Switch sw8 other_config:mac_only=true for n in $(seq 1 3); do ovn-nbctl --wait=sb lsp-add sw8 "p8$n" -- lsp-set-addresses "p8$n" dynamic done @@ -8965,48 +8965,48 @@ check_dynamic_addresses p82 "00:11:22:00:00:07" check_dynamic_addresses p83 "00:11:22:00:00:08" # clear mac_prefix and check it is allocated in a random manner -ovn-nbctl --wait=hv remove NB_Global . options mac_prefix -ovn-nbctl ls-add sw9 -ovn-nbctl --wait=sb set Logical-Switch sw9 other_config:mac_only=true -ovn-nbctl --wait=sb lsp-add sw9 p91 -- lsp-set-addresses p91 dynamic +check ovn-nbctl --wait=hv remove NB_Global . options mac_prefix +check ovn-nbctl ls-add sw9 +check ovn-nbctl --wait=sb set Logical-Switch sw9 other_config:mac_only=true +check ovn-nbctl --wait=sb lsp-add sw9 p91 -- lsp-set-addresses p91 dynamic mac_prefix=$(ovn-nbctl --wait=sb get NB_Global . options:mac_prefix | tr -d \") port_addr=$(ovn-nbctl get Logical-Switch-Port p91 dynamic_addresses | tr -d \") AT_CHECK([test "$port_addr" = "${mac_prefix}:00:00:09"], [0], []) # set mac_prefix to all-zeroes and check it is allocated in a random manner -ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="00:00:00:00:00:00" -ovn-nbctl ls-add sw14 -ovn-nbctl --wait=sb set Logical-Switch sw14 other_config:mac_only=true -ovn-nbctl --wait=sb lsp-add sw14 p141 -- lsp-set-addresses p141 dynamic +check ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="00:00:00:00:00:00" +check ovn-nbctl ls-add sw14 +check ovn-nbctl --wait=sb set Logical-Switch sw14 other_config:mac_only=true +check ovn-nbctl --wait=sb lsp-add sw14 p141 -- lsp-set-addresses p141 dynamic mac_prefix=$(ovn-nbctl --wait=sb get NB_Global . options:mac_prefix | tr -d \") port_addr=$(ovn-nbctl get Logical-Switch-Port p141 dynamic_addresses | tr -d \") AT_CHECK([test "$mac_prefix" != "00:00:00:00:00:00"], [0], []) AT_CHECK([test "$port_addr" = "${mac_prefix}:00:00:0a"], [0], []) check ovn-nbctl --wait=sb lsp-del p141 -ovn-nbctl --wait=sb ls-del sw14 +check ovn-nbctl --wait=sb ls-del sw14 -ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="00:11:22" -ovn-nbctl ls-add sw10 -ovn-nbctl --wait=sb set Logical-Switch sw10 other_config:ipv6_prefix="ae01::" -ovn-nbctl --wait=sb lsp-add sw10 p101 -- lsp-set-addresses p101 "dynamic ae01::1" +check ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="00:11:22" +check ovn-nbctl ls-add sw10 +check ovn-nbctl --wait=sb set Logical-Switch sw10 other_config:ipv6_prefix="ae01::" +check ovn-nbctl --wait=sb lsp-add sw10 p101 -- lsp-set-addresses p101 "dynamic ae01::1" check_dynamic_addresses p101 "00:11:22:00:00:0a ae01::1" -ovn-nbctl --wait=sb set Logical-Switch sw10 other_config:subnet=192.168.110.0/24 -ovn-nbctl --wait=sb lsp-add sw10 p102 -- lsp-set-addresses p102 "dynamic 192.168.110.10 ae01::2" +check ovn-nbctl --wait=sb set Logical-Switch sw10 other_config:subnet=192.168.110.0/24 +check ovn-nbctl --wait=sb lsp-add sw10 p102 -- lsp-set-addresses p102 "dynamic 192.168.110.10 ae01::2" check_dynamic_addresses p102 "00:11:22:a8:6e:0b 192.168.110.10 ae01::2" # Configure subnet using address from middle of the subnet and ensure # address is allocated from the beginning. -ovn-nbctl ls-add sw11 -ovn-nbctl --wait=sb set Logical-Switch sw11 other_config:subnet=172.16.1.254/29 -ovn-nbctl --wait=sb lsp-add sw11 p103 -- lsp-set-addresses p103 "22:33:44:55:66:77 dynamic" +check ovn-nbctl ls-add sw11 +check ovn-nbctl --wait=sb set Logical-Switch sw11 other_config:subnet=172.16.1.254/29 +check ovn-nbctl --wait=sb lsp-add sw11 p103 -- lsp-set-addresses p103 "22:33:44:55:66:77 dynamic" check_dynamic_addresses p103 "22:33:44:55:66:77 172.16.1.250" -ovn-nbctl ls-add sw12 +check ovn-nbctl ls-add sw12 for i in $(seq 0 1); do for j in $(seq 1 99); do idx=$((i*100+j)) @@ -9014,12 +9014,12 @@ for i in $(seq 0 1); do lsp-set-addresses sw12-p${idx} "00:00:00:00:$i:$j dynamic" done done -ovn-nbctl --wait=sb set Logical-Switch sw12 other_config:subnet=192.10.2.0/24 +check ovn-nbctl --wait=sb set Logical-Switch sw12 other_config:subnet=192.10.2.0/24 AT_CHECK([ovn-nbctl list Logical-Switch-Port | grep 192.10.2.127], [0], [ignore]) AT_CHECK([ovn-nbctl list Logical-Switch-Port | grep 192.10.2.128], [0], [ignore]) AT_CHECK([ovn-nbctl list Logical-Switch-Port | grep 192.10.2.180], [0], [ignore]) -ovn-nbctl --wait=sb set Logical-Switch sw12 other_config:subnet=192.10.2.0/25 +check ovn-nbctl --wait=sb set Logical-Switch sw12 other_config:subnet=192.10.2.0/25 AT_CHECK([ovn-nbctl list Logical-Switch-Port | grep 192.10.2.127], [1]) AT_CHECK([ovn-nbctl list Logical-Switch-Port | grep 192.10.2.128], [1]) AT_CHECK([ovn-nbctl list Logical-Switch-Port | grep 192.10.2.180], [1]) @@ -9039,36 +9039,36 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([ipam connectivity]) ovn_start -ovn-nbctl --wait=sb lr-add R1 +check ovn-nbctl --wait=sb lr-add R1 # Test for a ping using dynamically allocated addresses. -ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" -ovn-nbctl ls-add foo -- add Logical_Switch foo other_config subnet=192.168.1.0/24 -ovn-nbctl ls-add alice -- add Logical_Switch alice other_config subnet=192.168.2.0/24 +check ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" +check ovn-nbctl ls-add foo -- add Logical_Switch foo other_config subnet=192.168.1.0/24 +check ovn-nbctl ls-add alice -- add Logical_Switch alice other_config subnet=192.168.2.0/24 # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ +check ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ options:router-port=foo \ -- lsp-set-addresses rp-foo router # Connect alice to R1 -ovn-nbctl lrp-add R1 alice 00:00:00:01:02:04 192.168.2.1/24 -ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice type=router \ +check ovn-nbctl lrp-add R1 alice 00:00:00:01:02:04 192.168.2.1/24 +check ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice type=router \ options:router-port=alice addresses=\"00:00:00:01:02:04\" # Create logical port foo1 in foo -ovn-nbctl --wait=sb lsp-add foo foo1 \ +check ovn-nbctl --wait=sb lsp-add foo foo1 \ -- lsp-set-addresses foo1 "dynamic" check ovn-nbctl wait-until Logical-Switch-Port foo1 dynamic_addresses='"0a:00:00:a8:01:03 192.168.1.2"' # Create logical port alice1 in alice -ovn-nbctl --wait=sb lsp-add alice alice1 \ +check ovn-nbctl --wait=sb lsp-add alice alice1 \ -- lsp-set-addresses alice1 "dynamic" check ovn-nbctl wait-until Logical-Switch-Port alice1 dynamic_addresses='"0a:00:00:a8:02:03 192.168.2.2"' # Create logical port foo2 in foo -ovn-nbctl --wait=sb lsp-add foo foo2 \ +check ovn-nbctl --wait=sb lsp-add foo foo2 \ -- lsp-set-addresses foo2 "dynamic" check ovn-nbctl wait-until Logical-Switch-Port foo2 dynamic_addresses='"0a:00:00:a8:01:04 192.168.1.3"' @@ -9166,12 +9166,12 @@ AT_SETUP([ovs-vswitchd restart]) AT_KEYWORDS([vswitchd]) ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "f0:00:00:00:00:01 10.0.0.4" -ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4" +check ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4" net_add n1 sim_add hv1 @@ -9266,33 +9266,33 @@ ovn_start # Topology: Two LSs - ls1 and ls2 are connected via router r0 # Create logical switches -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Create router ovn-nbctl create Logical_Router name=lr0 # Add router ls1p1 port to gateway router -ovn-nbctl lrp-add lr0 lrp-ls1lp1 f0:00:00:00:00:01 192.168.0.1/24 -ovn-nbctl lsp-add ls1 ls1lp1 -- set Logical_Switch_Port ls1lp1 \ +check ovn-nbctl lrp-add lr0 lrp-ls1lp1 f0:00:00:00:00:01 192.168.0.1/24 +check ovn-nbctl lsp-add ls1 ls1lp1 -- set Logical_Switch_Port ls1lp1 \ type=router options:router-port=lrp-ls1lp1 \ addresses='"f0:00:00:00:00:01 192.168.0.1"' # Add router ls2p2 port to gateway router -ovn-nbctl lrp-add lr0 lrp-ls2lp1 f0:00:00:00:00:02 192.168.1.1/24 -ovn-nbctl lsp-add ls2 ls2lp1 -- set Logical_Switch_Port ls2lp1 \ +check ovn-nbctl lrp-add lr0 lrp-ls2lp1 f0:00:00:00:00:02 192.168.1.1/24 +check ovn-nbctl lsp-add ls2 ls2lp1 -- set Logical_Switch_Port ls2lp1 \ type=router options:router-port=lrp-ls2lp1 \ addresses='"f0:00:00:00:00:02 192.168.1.1"' # Set default gateway (nexthop) to 192.168.1.254 -ovn-nbctl lr-route-add lr0 "0.0.0.0/0" 192.168.1.254 lrp-ls2lp1 +check ovn-nbctl lr-route-add lr0 "0.0.0.0/0" 192.168.1.254 lrp-ls2lp1 # Create logical port ls1lp2 in ls1 -ovn-nbctl lsp-add ls1 ls1lp2 \ +check ovn-nbctl lsp-add ls1 ls1lp2 \ -- lsp-set-addresses ls1lp2 "f0:00:00:00:00:03 192.168.0.2" # Create logical port ls2lp2 in ls2 -ovn-nbctl lsp-add ls2 ls2lp2 \ +check ovn-nbctl lsp-add ls2 ls2lp2 \ -- lsp-set-addresses ls2lp2 "f0:00:00:00:00:04 192.168.1.10" net_add n1 @@ -9345,15 +9345,15 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([send gratuitous arp for nat ips in localnet]) ovn_start # Create logical switch -ovn-nbctl ls-add ls0 +check ovn-nbctl ls-add ls0 # Create gateway router ovn-nbctl create Logical_Router name=lr0 options:chassis=hv1 # Add router port to gateway router -ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 -ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ +check ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 +check ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ type=router options:router-port=lrp0 addresses='"f0:00:00:00:00:01"' # Add nat-address option -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="f0:00:00:00:00:01 192.168.0.2" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="f0:00:00:00:00:01 192.168.0.2" net_add n1 sim_add hv1 @@ -9390,16 +9390,16 @@ fffffffffffff0000000000108060001080006040001f00000000001c0a80002000000000000c0a8 # Temporarily remove nat-addresses option to avoid race conditions # due to GARP backoff -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" # Let's use gw router port now hv1_uuid=$(ovn-sbctl --bare --columns _uuid list chassis hv1) -ovn-nbctl remove logical_router lr0 options chassis -ovn-nbctl lrp-set-gateway-chassis lrp0 hv1 20 +check ovn-nbctl remove logical_router lr0 options chassis +check ovn-nbctl lrp-set-gateway-chassis lrp0 hv1 20 OVS_WAIT_UNTIL([ cr_lrp0_ch=$(ovn-sbctl --bare --columns chassis list port_binding cr-lrp0) test "$cr_lrp0_ch" = $hv1_uuid ]) -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="f0:00:00:00:00:03 192.168.0.3" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="f0:00:00:00:00:03 192.168.0.3" reset_pcap_file snoopvif hv1/snoopvif OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 140]) @@ -9421,19 +9421,19 @@ AT_SKIP_IF([test $HAVE_TCPDUMP = no]) ovn_start # Create logical switch -ovn-nbctl ls-add ls0 +check ovn-nbctl ls-add ls0 # Create gateway router -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 # Add router port to gateway router -ovn-nbctl lrp-add lr0 lr0-ls0 f0:00:00:00:00:01 192.168.0.1/24 -ovn-nbctl lsp-add ls0 ls0-lr0 -- set Logical_Switch_Port ls0-lr0 \ +check ovn-nbctl lrp-add lr0 lr0-ls0 f0:00:00:00:00:01 192.168.0.1/24 +check ovn-nbctl lsp-add ls0 ls0-lr0 -- set Logical_Switch_Port ls0-lr0 \ type=router options:router-port=lr0-ls0 addresses='"f0:00:00:00:00:01"' # Create a localnet port. -ovn-nbctl lsp-add ls0 ln_port -ovn-nbctl lsp-set-addresses ln_port unknown -ovn-nbctl lsp-set-type ln_port localnet -ovn-nbctl --wait=hv lsp-set-options ln_port network_name=physnet1 +check ovn-nbctl lsp-add ls0 ln_port +check ovn-nbctl lsp-set-addresses ln_port unknown +check ovn-nbctl lsp-set-type ln_port localnet +check ovn-nbctl --wait=hv lsp-set-options ln_port network_name=physnet1 # Prepare packets touch empty_expected @@ -9531,15 +9531,15 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([send gratuitous arp with nat-addresses router in localnet]) ovn_start # Create logical switch -ovn-nbctl ls-add ls0 +check ovn-nbctl ls-add ls0 # Create gateway router ovn-nbctl create Logical_Router name=lr0 options:chassis=hv1 # Add router port to gateway router -ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 -ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ +check ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 +check ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ type=router options:router-port=lrp0 addresses='"f0:00:00:00:00:01"' # Add nat-address option -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" # Add NAT rules AT_CHECK([ovn-nbctl lr-nat-add lr0 snat 192.168.0.1 10.0.0.0/24]) AT_CHECK([ovn-nbctl lr-nat-add lr0 dnat 192.168.0.2 10.0.0.1]) @@ -9589,12 +9589,12 @@ AT_CHECK([sort packets], [0], [expout]) # Temporarily remove nat-addresses option to avoid race conditions # due to GARP backoff -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" as hv1 reset_pcap_file snoopvif hv1/snoopvif # Re-add nat-addresses option -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" exclude-lb-vips-from-garp="true" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" exclude-lb-vips-from-garp="true" # Wait for packets to be received. OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 250]) @@ -9621,15 +9621,15 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([send reverse arp for router without ipv4 address]) ovn_start # Create logical switch -ovn-nbctl ls-add ls0 +check ovn-nbctl ls-add ls0 # Create gateway router ovn-nbctl create Logical_Router name=lr0 options:chassis=hv1 # Add router port to gateway router -ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 fd12:3456:789a:1::1/64 -ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ +check ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 fd12:3456:789a:1::1/64 +check ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ type=router options:router-port=lrp0 addresses='"f0:00:00:00:00:01"' # Add nat-address option -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" net_add n1 sim_add hv1 @@ -9667,12 +9667,12 @@ AT_CHECK([sort packets], [0], [expout]) # Temporarily remove nat-addresses option to avoid race conditions # due to GARP backoff -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" as hv1 reset_pcap_file snoopvif hv1/snoopvif # Re-add nat-addresses option -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" exclude-lb-vips-from-garp="true" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" exclude-lb-vips-from-garp="true" # Wait for packets to be received. OVS_WAIT_UNTIL([test `wc -c < "hv1/snoopvif-tx.pcap"` -ge 50]) @@ -9696,20 +9696,20 @@ as hv1 ovs-vsctl -- add-br br-phys ovn_attach n1 br-phys 192.168.0.1 # Create logical router lr0 -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 # Create ports lrp0, lrp1 in lr0 -ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 -ovn-nbctl lrp-add lr0 lrp1 f0:00:00:00:00:02 192.168.1.1/24 +check ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 +check ovn-nbctl lrp-add lr0 lrp1 f0:00:00:00:00:02 192.168.1.1/24 dp_uuid=$(fetch_column Datapath_Binding _uuid) ovn-sbctl create MAC_Binding ip=10.0.0.1 datapath=$dp_uuid logical_port=lrp0 mac="00:00:00:01:00:01" ovn-sbctl create MAC_Binding ip=10.0.0.1 datapath=$dp_uuid logical_port=lrp1 mac="00:00:00:01:00:02" ovn-sbctl find MAC_Binding # Delete port lrp0 and check that its MAC_Binding is deleted. -ovn-nbctl lrp-del lrp0 +check ovn-nbctl lrp-del lrp0 ovn-sbctl find MAC_Binding wait_row_count MAC_Binding 0 logical_port=lrp0 # Delete logical switch lr0 and check that its MAC_Binding is deleted. -ovn-nbctl lr-del lr0 +check ovn-nbctl lr-del lr0 ovn-sbctl find MAC_Binding wait_row_count MAC_Binding 0 @@ -9745,21 +9745,21 @@ for i in foo1 bar1 bar2 bar3; do done ovn-nbctl create Logical_Router name=R1 -ovn-nbctl ls-add foo -ovn-nbctl ls-add bar +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add bar # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo \ +check ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo \ type=router options:router-port=foo addresses=\"00:00:01:01:02:03\" # Connect bar to R1 -ovn-nbctl lrp-add R1 bar 00:00:01:01:02:04 172.16.1.1/24 -ovn-nbctl lsp-add bar rp-bar -- set Logical_Switch_Port rp-bar \ +check ovn-nbctl lrp-add R1 bar 00:00:01:01:02:04 172.16.1.1/24 +check ovn-nbctl lsp-add bar rp-bar -- set Logical_Switch_Port rp-bar \ type=router options:router-port=bar addresses=\"00:00:01:01:02:04\" # Create logical port foo1 in foo -ovn-nbctl lsp-add foo foo1 \ +check ovn-nbctl lsp-add foo foo1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port bar1, bar2 and bar3 in bar @@ -9897,7 +9897,7 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD([ AT_SETUP([lsp deletion and broadcast-flow deletion on localnet]) ovn_start -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 net_add n1 for i in 1 2; do sim_add hv$i @@ -9989,39 +9989,39 @@ lp1_ip="192.168.1.2" lp2_mac="f0:00:00:00:00:02" lp2_ip="192.168.1.3" -ovn-nbctl ls-add lsw0 -ovn-nbctl --wait=sb lsp-add lsw0 lp1 -ovn-nbctl --wait=sb lsp-add lsw0 lp2 -ovn-nbctl lsp-set-addresses lp1 $lp1_mac -ovn-nbctl lsp-set-addresses lp2 $lp2_mac -ovn-nbctl --wait=sb sync +check ovn-nbctl ls-add lsw0 +check ovn-nbctl --wait=sb lsp-add lsw0 lp1 +check ovn-nbctl --wait=sb lsp-add lsw0 lp2 +check ovn-nbctl lsp-set-addresses lp1 $lp1_mac +check ovn-nbctl lsp-set-addresses lp2 $lp2_mac +check ovn-nbctl --wait=sb sync wait_for_ports_up -ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==80' drop -ovn-nbctl --log --severity=alert --name=drop-flow acl-add lsw0 from-lport 1000 'tcp.dst==81' drop +check ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==80' drop +check ovn-nbctl --log --severity=alert --name=drop-flow acl-add lsw0 from-lport 1000 'tcp.dst==81' drop -ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==180' drop -ovn-nbctl --log --severity=alert --name=drop-flow acl-add lsw0 to-lport 1000 'tcp.dst==181' drop +check ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==180' drop +check ovn-nbctl --log --severity=alert --name=drop-flow acl-add lsw0 to-lport 1000 'tcp.dst==181' drop -ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==82' allow -ovn-nbctl --log --severity=info --name=allow-flow acl-add lsw0 from-lport 1000 'tcp.dst==83' allow +check ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==82' allow +check ovn-nbctl --log --severity=info --name=allow-flow acl-add lsw0 from-lport 1000 'tcp.dst==83' allow -ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==82' allow -ovn-nbctl --log --severity=info --name=allow-flow acl-add lsw0 to-lport 1000 'tcp.dst==83' allow +check ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==82' allow +check ovn-nbctl --log --severity=info --name=allow-flow acl-add lsw0 to-lport 1000 'tcp.dst==83' allow -ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==84' allow-related -ovn-nbctl --log acl-add lsw0 from-lport 1000 'tcp.dst==85' allow-related +check ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==84' allow-related +check ovn-nbctl --log acl-add lsw0 from-lport 1000 'tcp.dst==85' allow-related -ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==84' allow-related -ovn-nbctl --log acl-add lsw0 to-lport 1000 'tcp.dst==85' allow-related +check ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==84' allow-related +check ovn-nbctl --log acl-add lsw0 to-lport 1000 'tcp.dst==85' allow-related -ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==86' reject -ovn-nbctl --log --severity=alert --name=reject-flow acl-add lsw0 from-lport 1000 'tcp.dst==87' reject +check ovn-nbctl acl-add lsw0 from-lport 1000 'tcp.dst==86' reject +check ovn-nbctl --log --severity=alert --name=reject-flow acl-add lsw0 from-lport 1000 'tcp.dst==87' reject -ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==186' reject -ovn-nbctl --log --severity=alert --name=reject-flow acl-add lsw0 to-lport 1000 'tcp.dst==187' reject +check ovn-nbctl acl-add lsw0 to-lport 1000 'tcp.dst==186' reject +check ovn-nbctl --log --severity=alert --name=reject-flow acl-add lsw0 to-lport 1000 'tcp.dst==187' reject -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -10139,28 +10139,28 @@ lp1_ip="192.168.1.2" lp2_mac="f0:00:00:00:00:02" lp2_ip="192.168.1.3" -ovn-nbctl ls-add lsw0 -ovn-nbctl --wait=sb lsp-add lsw0 lp1 -ovn-nbctl --wait=sb lsp-add lsw0 lp2 -ovn-nbctl lsp-set-addresses lp1 $lp1_mac -ovn-nbctl lsp-set-addresses lp2 $lp2_mac -ovn-nbctl --wait=sb sync +check ovn-nbctl ls-add lsw0 +check ovn-nbctl --wait=sb lsp-add lsw0 lp1 +check ovn-nbctl --wait=sb lsp-add lsw0 lp2 +check ovn-nbctl lsp-set-addresses lp1 $lp1_mac +check ovn-nbctl lsp-set-addresses lp2 $lp2_mac +check ovn-nbctl --wait=sb sync wait_for_ports_up # Add an ACL that rate-limits logs at 10 per second. -ovn-nbctl meter-add http-rl1 drop 10 pktps -ovn-nbctl --log --severity=alert --meter=http-rl1 --name=http-acl1 acl-add lsw0 to-lport 1000 'tcp.dst==80' drop +check ovn-nbctl meter-add http-rl1 drop 10 pktps +check ovn-nbctl --log --severity=alert --meter=http-rl1 --name=http-acl1 acl-add lsw0 to-lport 1000 'tcp.dst==80' drop check ovn-nbctl --wait=hv sync # Add an ACL that rate-limits logs at 5 per second. -ovn-nbctl meter-add http-rl2 drop 5 pktps -ovn-nbctl --log --severity=alert --meter=http-rl2 --name=http-acl2 acl-add lsw0 to-lport 1000 'tcp.dst==81' allow +check ovn-nbctl meter-add http-rl2 drop 5 pktps +check ovn-nbctl --log --severity=alert --meter=http-rl2 --name=http-acl2 acl-add lsw0 to-lport 1000 'tcp.dst==81' allow check ovn-nbctl --wait=hv sync # Add an ACL that doesn't rate-limit logs. -ovn-nbctl --log --severity=alert --name=http-acl3 acl-add lsw0 to-lport 1000 'tcp.dst==82' drop -ovn-nbctl --wait=hv sync +check ovn-nbctl --log --severity=alert --name=http-acl3 acl-add lsw0 to-lport 1000 'tcp.dst==82' drop +check ovn-nbctl --wait=hv sync ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -10231,33 +10231,33 @@ lp1_ip="192.168.1.2" lp2_mac="f0:00:00:00:00:02" lp2_ip="192.168.1.3" -ovn-nbctl ls-add lsw0 -ovn-nbctl --wait=sb lsp-add lsw0 lp1 -ovn-nbctl --wait=sb lsp-add lsw0 lp2 -ovn-nbctl lsp-set-addresses lp1 $lp1_mac -ovn-nbctl lsp-set-addresses lp2 $lp2_mac -ovn-nbctl --wait=sb sync +check ovn-nbctl ls-add lsw0 +check ovn-nbctl --wait=sb lsp-add lsw0 lp1 +check ovn-nbctl --wait=sb lsp-add lsw0 lp2 +check ovn-nbctl lsp-set-addresses lp1 $lp1_mac +check ovn-nbctl lsp-set-addresses lp2 $lp2_mac +check ovn-nbctl --wait=sb sync wait_for_ports_up ovn-appctl -t ovn-controller vlog/set file:dbg # Add acl1 and acl2 using same meter. -ovn-nbctl meter-add http-rl1 drop 10 pktps -ovn-nbctl --log --meter=http-rl1 acl-add lsw0 to-lport 1000 'tcp.dst==80' drop \ +check ovn-nbctl meter-add http-rl1 drop 10 pktps +check ovn-nbctl --log --meter=http-rl1 acl-add lsw0 to-lport 1000 'tcp.dst==80' drop \ -- --log --meter=http-rl1 acl-add lsw0 to-lport 1000 'tcp.dst==81' allow -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync AT_CHECK([ovs-ofctl -O OpenFlow13 dump-meters br-int | grep meter], [0], [ignore], [ignore]) # Delete acl1, meter should be kept in OVS -ovn-nbctl acl-del lsw0 to-lport 1000 'tcp.dst==80' -ovn-nbctl --wait=hv sync +check ovn-nbctl acl-del lsw0 to-lport 1000 'tcp.dst==80' +check ovn-nbctl --wait=hv sync AT_CHECK([ovs-ofctl -O OpenFlow13 dump-meters br-int | grep meter], [0], [ignore], [ignore]) # Delete acl2, meter should be deleted in OVS -ovn-nbctl acl-del lsw0 to-lport 1000 'tcp.dst==81' -ovn-nbctl --wait=hv sync +check ovn-nbctl acl-del lsw0 to-lport 1000 'tcp.dst==81' +check ovn-nbctl --wait=hv sync AT_CHECK([ovs-ofctl -O OpenFlow13 dump-meters br-int | grep meter], [1]) OVN_CLEANUP([hv]) @@ -10603,51 +10603,51 @@ ovn_start # 3 Logical switches - "mgmt" (172.16.1.0/24), "foo" (192.168.1.0/24) # and "bar" (192.168.2.0/24). They are all connected to router R1. -ovn-nbctl lr-add R1 -ovn-nbctl ls-add mgmt -ovn-nbctl ls-add foo -ovn-nbctl ls-add bar +check ovn-nbctl lr-add R1 +check ovn-nbctl ls-add mgmt +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add bar # Connect mgmt to R1 -ovn-nbctl lrp-add R1 mgmt 00:00:00:01:02:02 172.16.1.1/24 -ovn-nbctl lsp-add mgmt rp-mgmt -- set Logical_Switch_Port rp-mgmt type=router \ +check ovn-nbctl lrp-add R1 mgmt 00:00:00:01:02:02 172.16.1.1/24 +check ovn-nbctl lsp-add mgmt rp-mgmt -- set Logical_Switch_Port rp-mgmt type=router \ options:router-port=mgmt addresses=\"00:00:00:01:02:02\" # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ +check ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ options:router-port=foo addresses=\"00:00:00:01:02:03\" # Connect bar to R1 -ovn-nbctl lrp-add R1 bar 00:00:00:01:02:04 192.168.2.1/24 -ovn-nbctl lsp-add bar rp-bar -- set Logical_Switch_Port rp-bar type=router \ +check ovn-nbctl lrp-add R1 bar 00:00:00:01:02:04 192.168.2.1/24 +check ovn-nbctl lsp-add bar rp-bar -- set Logical_Switch_Port rp-bar type=router \ options:router-port=bar addresses=\"00:00:00:01:02:04\" # "mgmt" has VM1 and VM2 connected -ovn-nbctl lsp-add mgmt vm1 \ +check ovn-nbctl lsp-add mgmt vm1 \ -- lsp-set-addresses vm1 "f0:00:00:01:02:03 172.16.1.2" -ovn-nbctl lsp-add mgmt vm2 \ +check ovn-nbctl lsp-add mgmt vm2 \ -- lsp-set-addresses vm2 "f0:00:00:01:02:04 172.16.1.3" # "foo1" and "foo2" are containers belonging to switch "foo" # "foo1" has "VM1" as parent_port and "foo2" has "VM2" as parent_port. -ovn-nbctl lsp-add foo foo1 vm1 1 \ +check ovn-nbctl lsp-add foo foo1 vm1 1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:05 192.168.1.2" -ovn-nbctl lsp-add foo foo2 vm2 2 \ +check ovn-nbctl lsp-add foo foo2 vm2 2 \ -- lsp-set-addresses foo2 "f0:00:00:01:02:06 192.168.1.3" # "bar1" and "bar2" are containers belonging to switch "bar" # "bar1" has "VM1" as parent_port and "bar2" has "VM2" as parent_port. -ovn-nbctl lsp-add bar bar1 vm1 2 \ +check ovn-nbctl lsp-add bar bar1 vm1 2 \ -- lsp-set-addresses bar1 "f0:00:00:01:02:07 192.168.2.2" -ovn-nbctl lsp-add bar bar2 vm2 1 \ +check ovn-nbctl lsp-add bar bar2 vm2 1 \ -- lsp-set-addresses bar2 "f0:00:00:01:02:08 192.168.2.3" # bar3 is a standalone VM belonging to switch "bar" -ovn-nbctl lsp-add bar bar3 \ +check ovn-nbctl lsp-add bar bar3 \ -- lsp-set-addresses bar3 "f0:00:00:01:02:09 192.168.2.4" # Create two hypervisor and create OVS ports corresponding to logical ports. @@ -10710,18 +10710,18 @@ AT_CHECK([test ! -z $bar2_zoneid]) # ovn-nbctl --wait=hv sync does not take this into account, and hence we need # two "wait=hv" before we are sure that the ct-zone-id is removed from # external_ids. -ovn-nbctl --wait=hv lsp-del bar2 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv lsp-del bar2 +check ovn-nbctl --wait=hv sync bar2_zoneid=$(as hv2 ovs-vsctl get bridge br-int external_ids:ct-zone-bar2) AT_CHECK([test -z $bar2_zoneid]) # Add back bar2 # Same comment as above: two "wait=hv" are needed. -ovn-nbctl --wait=hv lsp-add bar bar2 vm2 1 \ +check ovn-nbctl --wait=hv lsp-add bar bar2 vm2 1 \ -- lsp-set-addresses bar2 "f0:00:00:01:02:08 192.168.2.3" wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync bar2_zoneid=$(as hv2 ovs-vsctl get bridge br-int external_ids:ct-zone-bar2) AT_CHECK([test ! -z $bar2_zoneid]) @@ -10835,13 +10835,13 @@ echo $packet >> expected2 OVN_CHECK_PACKETS([hv2/vm2-tx.pcap], [expected2]) # Test binding of parent and container ports. -ovn-nbctl lsp-set-options vm1 requested-chassis=foo +check ovn-nbctl lsp-set-options vm1 requested-chassis=foo OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up vm1)]) OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up foo1)]) OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up bar1)]) -ovn-nbctl clear logical_switch_port vm1 options +check ovn-nbctl clear logical_switch_port vm1 options OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up vm1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up foo1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up bar1)]) @@ -10856,18 +10856,18 @@ OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up vm1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up foo1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up bar1)]) -ovn-nbctl lsp-del vm1 +check ovn-nbctl lsp-del vm1 OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up foo1)]) OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up bar1)]) -ovn-nbctl lsp-add mgmt vm1 +check ovn-nbctl lsp-add mgmt vm1 OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up vm1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up foo1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up bar1)]) # Move VM1 to a new logical switch. -ovn-nbctl ls-add mgmt2 -ovn-nbctl lsp-del vm1 -- lsp-add mgmt2 vm1 +check ovn-nbctl ls-add mgmt2 +check ovn-nbctl lsp-del vm1 -- lsp-add mgmt2 vm1 OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up vm1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up foo1)]) OVS_WAIT_UNTIL([test xup = x$(ovn-nbctl lsp-get-up bar1)]) @@ -10942,71 +10942,71 @@ ovn-nbctl create Logical_Router name=R1 ovn-nbctl create Logical_Router name=R2 options:chassis="hv2" ovn-nbctl create Logical_Router name=R3 options:chassis="hv3" -ovn-nbctl ls-add foo -ovn-nbctl ls-add bar -ovn-nbctl ls-add alice -ovn-nbctl ls-add bob -ovn-nbctl ls-add join +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add bar +check ovn-nbctl ls-add alice +check ovn-nbctl ls-add bob +check ovn-nbctl ls-add join # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ +check ovn-nbctl lrp-add R1 foo 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ options:router-port=foo addresses=\"00:00:01:01:02:03\" # Connect bar to R1 -ovn-nbctl lrp-add R1 bar 00:00:01:01:02:04 192.168.2.1/24 -ovn-nbctl lsp-add bar rp-bar -- set Logical_Switch_Port rp-bar type=router \ +check ovn-nbctl lrp-add R1 bar 00:00:01:01:02:04 192.168.2.1/24 +check ovn-nbctl lsp-add bar rp-bar -- set Logical_Switch_Port rp-bar type=router \ options:router-port=bar addresses=\"00:00:01:01:02:04\" # Connect alice to R2 -ovn-nbctl lrp-add R2 alice 00:00:02:01:02:03 172.16.1.1/24 -ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ +check ovn-nbctl lrp-add R2 alice 00:00:02:01:02:03 172.16.1.1/24 +check ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ type=router options:router-port=alice addresses=\"00:00:02:01:02:03\" # Connect bob to R3 -ovn-nbctl lrp-add R3 bob 00:00:03:01:02:03 172.16.1.2/24 -ovn-nbctl lsp-add bob rp-bob -- set Logical_Switch_Port rp-bob \ +check ovn-nbctl lrp-add R3 bob 00:00:03:01:02:03 172.16.1.2/24 +check ovn-nbctl lsp-add bob rp-bob -- set Logical_Switch_Port rp-bob \ type=router options:router-port=bob addresses=\"00:00:03:01:02:03\" # Connect R1 to join -ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24 -ovn-nbctl lsp-add join r1-join -- set Logical_Switch_Port r1-join \ +check ovn-nbctl lrp-add R1 R1_join 00:00:04:01:02:03 20.0.0.1/24 +check ovn-nbctl lsp-add join r1-join -- set Logical_Switch_Port r1-join \ type=router options:router-port=R1_join addresses='"00:00:04:01:02:03"' # Connect R2 to join -ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 -ovn-nbctl lsp-add join r2-join -- set Logical_Switch_Port r2-join \ +check ovn-nbctl lrp-add R2 R2_join 00:00:04:01:02:04 20.0.0.2/24 +check ovn-nbctl lsp-add join r2-join -- set Logical_Switch_Port r2-join \ type=router options:router-port=R2_join addresses='"00:00:04:01:02:04"' # Connect R3 to join -ovn-nbctl lrp-add R3 R3_join 00:00:04:01:02:05 20.0.0.3/24 -ovn-nbctl lsp-add join r3-join -- set Logical_Switch_Port r3-join \ +check ovn-nbctl lrp-add R3 R3_join 00:00:04:01:02:05 20.0.0.3/24 +check ovn-nbctl lsp-add join r3-join -- set Logical_Switch_Port r3-join \ type=router options:router-port=R3_join addresses='"00:00:04:01:02:05"' # Install static routes with source ip address as the policy for routing. # We want traffic from 'foo' to go via R2 and traffic of 'bar' to go via R3. -ovn-nbctl --policy="src-ip" lr-route-add R1 192.168.1.0/24 20.0.0.2 -ovn-nbctl --policy="src-ip" lr-route-add R1 192.168.2.0/24 20.0.0.3 +check ovn-nbctl --policy="src-ip" lr-route-add R1 192.168.1.0/24 20.0.0.2 +check ovn-nbctl --policy="src-ip" lr-route-add R1 192.168.2.0/24 20.0.0.3 # Install static routes with destination ip address as the policy for routing. -ovn-nbctl lr-route-add R2 192.168.0.0/16 20.0.0.1 +check ovn-nbctl lr-route-add R2 192.168.0.0/16 20.0.0.1 -ovn-nbctl lr-route-add R3 192.168.0.0/16 20.0.0.1 +check ovn-nbctl lr-route-add R3 192.168.0.0/16 20.0.0.1 # Create logical port foo1 in foo -ovn-nbctl lsp-add foo foo1 \ +check ovn-nbctl lsp-add foo foo1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port bar1 in bar -ovn-nbctl lsp-add bar bar1 \ +check ovn-nbctl lsp-add bar bar1 \ -- lsp-set-addresses bar1 "f0:00:00:01:02:04 192.168.2.2" # Create logical port alice1 in alice -ovn-nbctl lsp-add alice alice1 \ +check ovn-nbctl lsp-add alice alice1 \ -- lsp-set-addresses alice1 "f0:00:00:01:02:05 172.16.1.3" # Create logical port bob1 in bob -ovn-nbctl --wait=hv lsp-add bob bob1 \ +check ovn-nbctl --wait=hv lsp-add bob bob1 \ -- lsp-set-addresses bob1 "f0:00:00:01:02:06 172.16.1.4" # Pre-populate the hypervisors' ARP tables so that we don't lose any @@ -11081,29 +11081,29 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([dns lookup : 1 HV, 2 LS, 2 LSPs/LS]) ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "f0:00:00:00:00:01 10.0.0.4 aef0::4" -ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4 aef0::4" +check ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4 aef0::4" -ovn-nbctl lsp-add ls1 ls1-lp2 \ +check ovn-nbctl lsp-add ls1 ls1-lp2 \ -- lsp-set-addresses ls1-lp2 "f0:00:00:00:00:02 10.0.0.6 20.0.0.4" -ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 10.0.0.6 20.0.0.4" +check ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 10.0.0.6 20.0.0.4" DNS1=`ovn-nbctl create DNS records={}` DNS2=`ovn-nbctl create DNS records={}` DNS3=`ovn-nbctl create DNS records={}` -ovn-nbctl set DNS $DNS1 records:vm1.ovn.org="10.0.0.4 aef0::4" -ovn-nbctl set DNS $DNS1 records:vm2.ovn.org="10.0.0.6 20.0.0.4" -ovn-nbctl set DNS $DNS2 records:vm3.ovn.org="40.0.0.4" -ovn-nbctl set DNS $DNS3 records:4.0.0.10.in-addr.arpa="vm1.ovn.org" -ovn-nbctl set DNS $DNS3 records:4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.f.e.a.ip6.arpa="vm1.ovn.org" +check ovn-nbctl set DNS $DNS1 records:vm1.ovn.org="10.0.0.4 aef0::4" +check ovn-nbctl set DNS $DNS1 records:vm2.ovn.org="10.0.0.6 20.0.0.4" +check ovn-nbctl set DNS $DNS2 records:vm3.ovn.org="40.0.0.4" +check ovn-nbctl set DNS $DNS3 records:4.0.0.10.in-addr.arpa="vm1.ovn.org" +check ovn-nbctl set DNS $DNS3 records:4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.f.e.a.ip6.arpa="vm1.ovn.org" -ovn-nbctl set Logical_switch ls1 dns_records="$DNS1" +check ovn-nbctl set Logical_switch ls1 dns_records="$DNS1" net_add n1 sim_add hv1 @@ -11347,7 +11347,7 @@ rm -f 2.expected AS_BOX([Clear the query name options for ls1-lp2]) -ovn-nbctl --wait=hv remove DNS $DNS1 records vm2.ovn.org +check ovn-nbctl --wait=hv remove DNS $DNS1 records vm2.ovn.org ovn-sbctl list DNS > dns2 AT_CAPTURE_FILE([dns2]) ovn-sbctl dump-flows > sbflows2 @@ -11374,7 +11374,7 @@ rm -f 2.expected AS_BOX([Clear the query name for ls1-lp1]) # Since ls1 has no query names configued, # ovn-northd should not add the DNS flows. -ovn-nbctl --wait=hv remove DNS $DNS1 records vm1.ovn.org +check ovn-nbctl --wait=hv remove DNS $DNS1 records vm1.ovn.org ovn-sbctl list DNS > dns3 AT_CAPTURE_FILE([dns3]) ovn-sbctl dump-flows > sbflows3 @@ -11400,7 +11400,7 @@ rm -f 2.expected AS_BOX([Test IPv6 (AAAA records) using IPv4 packet.]) # Add back the DNS options for ls1-lp1. -ovn-nbctl --wait=hv set DNS $DNS1 records:vm1.ovn.org="10.0.0.4 aef0::4" +check ovn-nbctl --wait=hv set DNS $DNS1 records:vm1.ovn.org="10.0.0.4 aef0::4" ovn-sbctl list DNS > dns4 AT_CAPTURE_FILE([dns4]) ovn-sbctl dump-flows > sbflows4 @@ -11484,7 +11484,7 @@ rm -f 2.expected AS_BOX([Add one more DNS record to the ls1]) -ovn-nbctl --wait=hv set Logical_switch ls1 dns_records="$DNS1 $DNS2" +check ovn-nbctl --wait=hv set Logical_switch ls1 dns_records="$DNS1 $DNS2" ovn-sbctl list DNS > dns5 AT_CAPTURE_FILE([dns5]) ovn-sbctl dump-flows > sbflows5 @@ -11529,7 +11529,7 @@ rm -f 2.expected # Add one more DNS record to the ls1. -ovn-nbctl --wait=hv set Logical_switch ls1 dns_records="$DNS1 $DNS2 $DNS3" +check ovn-nbctl --wait=hv set Logical_switch ls1 dns_records="$DNS1 $DNS2 $DNS3" echo "*************************" ovn-sbctl list DNS echo "*************************" @@ -11732,7 +11732,7 @@ check ovs-vsctl -- add-port br-int ext1-vif1 -- \ options:rxq_pcap=ext1/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 +check ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 # Pre-populate the hypervisors' ARP tables so that we don't lose any # packets for ARP resolution (native tunneling doesn't queue packets # for ARP resolution). @@ -11971,7 +11971,7 @@ check ovs-vsctl -- add-port br-int ext1-vif1 -- \ options:rxq_pcap=ext1/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 +check ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 # Pre-populate the hypervisors' ARP tables so that we don't lose any # packets for ARP resolution (native tunneling doesn't queue packets # for ARP resolution). @@ -12275,7 +12275,7 @@ check as hv3 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys dnl Allow some time for ovn-northd and ovn-controller to catch up. wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync OVN_WAIT_PATCH_PORT_FLOWS(["ln-outside"], ["hv3"]) (echo "---------NB dump-----" @@ -12395,7 +12395,7 @@ OVN_WAIT_PATCH_PORT_FLOWS(["ln-alice"], ["hv2"]) dnl Allow some time for ovn-controller to catch up. wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # ARP for router IP address from outside1 test_arp 3 1 f00000010204 $outside_ip $rtr_ip 000002010203 @@ -12449,7 +12449,7 @@ as hv1 ovs-vsctl -- add-port br-int hv1-vif2 -- \ options:rxq_pcap=hv1/vif2-rx.pcap \ ofport-request=1 -ovn-nbctl lsp-add alice alice1 \ +check ovn-nbctl lsp-add alice alice1 \ -- lsp-set-addresses alice1 "f0:00:00:01:02:05 172.16.1.4" # Create logical port foo2 in foo on hv2 @@ -12459,7 +12459,7 @@ as hv2 ovs-vsctl -- add-port br-int hv2-vif1 -- \ options:rxq_pcap=hv2/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl lsp-add foo foo2 \ +check ovn-nbctl lsp-add foo foo2 \ -- lsp-set-addresses foo2 "f0:00:00:01:02:06 192.168.1.3" # Allow some time for ovn-northd and ovn-controller to catch up. @@ -12508,26 +12508,26 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([send gratuitous arp for NAT rules on distributed router]) ovn_start # Create logical switches -ovn-nbctl ls-add ls0 -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls0 +check ovn-nbctl ls-add ls1 # Create distributed router ovn-nbctl create Logical_Router name=lr0 # Add distributed gateway port to distributed router -ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 \ +check ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.1/24 \ -- lrp-set-gateway-chassis lrp0 hv2 -ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ +check ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ type=router options:router-port=lrp0 addresses="router" # Add router port to ls1 -ovn-nbctl lrp-add lr0 lrp1 f0:00:00:00:00:02 10.0.0.1/24 -ovn-nbctl lsp-add ls1 lrp1-rp -- set Logical_Switch_Port lrp1-rp \ +check ovn-nbctl lrp-add lr0 lrp1 f0:00:00:00:00:02 10.0.0.1/24 +check ovn-nbctl lsp-add ls1 lrp1-rp -- set Logical_Switch_Port lrp1-rp \ type=router options:router-port=lrp1 addresses="router" # Add logical ports for NAT rules -ovn-nbctl lsp-add ls1 foo1 \ +check ovn-nbctl lsp-add ls1 foo1 \ -- lsp-set-addresses foo1 "00:00:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-add ls1 foo2 \ +check ovn-nbctl lsp-add ls1 foo2 \ -- lsp-set-addresses foo2 "00:00:00:00:00:04 10.0.0.4" # Add nat-addresses option -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" # Add NAT rules AT_CHECK([ovn-nbctl lr-nat-add lr0 snat 192.168.0.1 10.0.0.0/24]) AT_CHECK([ovn-nbctl lr-nat-add lr0 dnat 192.168.0.2 10.0.0.2]) @@ -12583,7 +12583,7 @@ sort packets | cat # Temporarily remove nat-addresses option to avoid race conditions # due to GARP backoff -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="" as hv1 reset_pcap_file snoopvif hv1/snoopvif @@ -12602,7 +12602,7 @@ AT_CHECK([as hv3 ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=p OVN_WAIT_PATCH_PORT_FLOWS(["ln_port"], ["hv3"]) # Re-add nat-addresses option -ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" +check ovn-nbctl lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" garp_1="fffffffffffff0000000000308060001080006040001f00000000003c0a80003000000000000c0a80003" echo $garp_1 > expected_out @@ -12871,18 +12871,18 @@ cat hv3-vif1.expected > expout AT_CHECK([sort hv3-vif1], [0], [expout]) AS_BOX([Test the GARP for the router port ip - 192.168.1.1]) -ovn-nbctl --wait=sb ha-chassis-group-add hagrp1 +check ovn-nbctl --wait=sb ha-chassis-group-add hagrp1 as hv1 reset_pcap_file hv1-vif1 hv1/vif1 as hv2 reset_pcap_file br-ex_n2 hv2/br-ex_n2 as hv4 reset_pcap_file br-ex_n2 hv4/br-ex_n2 -ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 hv2 30 -ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 hv4 20 +check ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 hv2 30 +check ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 hv4 20 hagrp1_uuid=`ovn-nbctl --bare --columns _uuid find ha_chassis_group name=hagrp1` -ovn-nbctl lrp-del-gateway-chassis alice hv2 -ovn-nbctl --wait=sb set logical_router_port alice ha_chassis_group=$hagrp1_uuid +check ovn-nbctl lrp-del-gateway-chassis alice hv2 +check ovn-nbctl --wait=sb set logical_router_port alice ha_chassis_group=$hagrp1_uuid # When hv2 claims the gw router port cr-alice, it should send out # GARP for 192.168.1.1 and it should be received by foo1 on hv1. @@ -12906,7 +12906,7 @@ AT_CHECK([cat empty], [0], []) AS_BOX([Make hv4 active]) as hv1 reset_pcap_file hv1-vif1 hv1/vif1 as hv4 reset_pcap_file br-ex_n2 hv4/br-ex_n2 -ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 hv4 40 +check ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 hv4 40 AS_BOX([Wait till cr-alice is claimed by hv4]) hv4_chassis=$(fetch_column Chassis _uuid name=hv4) @@ -12951,11 +12951,11 @@ ovn_start # Create hypervisor and logical switch lsw0, logical router lr0, attach lsw0 # onto lr0, set Logical_Router_Port.ipv6_ra_configs:address_mode column to # 'slaac' to allow lrp0 send RA for SLAAC mode. -ovn-nbctl ls-add lsw0 -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lrp0 fa:16:3e:00:00:01 fdad:1234:5678::1/64 -ovn-nbctl set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode="slaac" -ovn-nbctl \ +check ovn-nbctl ls-add lsw0 +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lrp0 fa:16:3e:00:00:01 fdad:1234:5678::1/64 +check ovn-nbctl set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode="slaac" +check ovn-nbctl \ -- lsp-add lsw0 lsp0 \ -- set Logical_Switch_Port lsp0 type=router \ options:router-port=lrp0 \ @@ -12966,23 +12966,23 @@ as hv1 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.2 -ovn-nbctl lsp-add lsw0 lp1 -ovn-nbctl lsp-set-addresses lp1 "fa:16:3e:00:00:02 10.0.0.12 fdad:1234:5678:0:f816:3eff:fe:2" -ovn-nbctl lsp-set-port-security lp1 "fa:16:3e:00:00:02 10.0.0.12 fdad:1234:5678:0:f816:3eff:fe:2" +check ovn-nbctl lsp-add lsw0 lp1 +check ovn-nbctl lsp-set-addresses lp1 "fa:16:3e:00:00:02 10.0.0.12 fdad:1234:5678:0:f816:3eff:fe:2" +check ovn-nbctl lsp-set-port-security lp1 "fa:16:3e:00:00:02 10.0.0.12 fdad:1234:5678:0:f816:3eff:fe:2" -ovn-nbctl lsp-add lsw0 lp2 -ovn-nbctl lsp-set-addresses lp2 "fa:16:3e:00:00:03 10.0.0.13 fdad:1234:5678:0:f816:3eff:fe:3" -ovn-nbctl lsp-set-port-security lp2 "fa:16:3e:00:00:03 10.0.0.13 fdad:1234:5678:0:f816:3eff:fe:3" +check ovn-nbctl lsp-add lsw0 lp2 +check ovn-nbctl lsp-set-addresses lp2 "fa:16:3e:00:00:03 10.0.0.13 fdad:1234:5678:0:f816:3eff:fe:3" +check ovn-nbctl lsp-set-port-security lp2 "fa:16:3e:00:00:03 10.0.0.13 fdad:1234:5678:0:f816:3eff:fe:3" -ovn-nbctl lsp-add lsw0 lp3 -ovn-nbctl lsp-set-addresses lp3 "fa:16:3e:00:00:04 10.0.0.14 fdad:1234:5678:0:f816:3eff:fe:4" -ovn-nbctl lsp-set-port-security lp3 "fa:16:3e:00:00:04 10.0.0.14 fdad:1234:5678:0:f816:3eff:fe:4" +check ovn-nbctl lsp-add lsw0 lp3 +check ovn-nbctl lsp-set-addresses lp3 "fa:16:3e:00:00:04 10.0.0.14 fdad:1234:5678:0:f816:3eff:fe:4" +check ovn-nbctl lsp-set-port-security lp3 "fa:16:3e:00:00:04 10.0.0.14 fdad:1234:5678:0:f816:3eff:fe:4" # Add ACL rule for ICMPv6 on lsw0 -ovn-nbctl acl-add lsw0 from-lport 1002 'ip6 && icmp6' allow-related -ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp1" && ip6 && icmp6' allow-related -ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp2" && ip6 && icmp6' allow-related -ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp3" && ip6 && icmp6' allow-related +check ovn-nbctl acl-add lsw0 from-lport 1002 'ip6 && icmp6' allow-related +check ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp1" && ip6 && icmp6' allow-related +check ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp2" && ip6 && icmp6' allow-related +check ovn-nbctl acl-add lsw0 to-lport 1002 'outport == "lp3" && ip6 && icmp6' allow-related ovs-vsctl -- add-port br-int hv1-vif1 -- \ set interface hv1-vif1 external-ids:iface-id=lp1 \ @@ -13114,20 +13114,20 @@ test_ipv6_ra 1 $src_mac $src_lla "$ra" 0 $prefix "" "" "" check_packets 1 # Check with RA with src being "::". -ovn-nbctl --wait=hv lsp-set-port-security lp1 "" +check ovn-nbctl --wait=hv lsp-set-port-security lp1 "" test_ipv6_ra 1 $src_mac "::" "$ra" 0 $prefix "" "" "" check_packets 1 -ovn-nbctl --wait=hv lsp-set-port-security lp1 "fa:16:3e:00:00:02 10.0.0.12 fdad:1234:5678:0:f816:3eff:fe:2" +check ovn-nbctl --wait=hv lsp-set-port-security lp1 "fa:16:3e:00:00:02 10.0.0.12 fdad:1234:5678:0:f816:3eff:fe:2" # Set the MTU to 1500, send_periodic to false, preference to LOW -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:mtu=1500 -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:send_periodic="false" -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:router_preference="LOW" -ovn-nbctl --wait=hv set Logical_Router_port lrp0 ipv6_ra_configs:rdnss=1000::11 -ovn-nbctl --wait=hv set Logical_Router_port lrp0 ipv6_ra_configs:dnssl=aa.bb.cc -ovn-nbctl --wait=hv set Logical_Router_port lrp0 ipv6_ra_configs:route_info=HIGH-1001::11/48,LOW-1002::11/96 +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:mtu=1500 +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:send_periodic="false" +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:router_preference="LOW" +check ovn-nbctl --wait=hv set Logical_Router_port lrp0 ipv6_ra_configs:rdnss=1000::11 +check ovn-nbctl --wait=hv set Logical_Router_port lrp0 ipv6_ra_configs:dnssl=aa.bb.cc +check ovn-nbctl --wait=hv set Logical_Router_port lrp0 ipv6_ra_configs:route_info=HIGH-1001::11/48,LOW-1002::11/96 # Make sure that ovn-controller has installed the corresponding OF Flow. OVS_WAIT_UNTIL([test 1 = `as hv1 ovs-ofctl dump-flows br-int | grep -c "ipv6_dst=ff02::2,nw_ttl=255,icmp_type=133,icmp_code=0"`]) @@ -13143,10 +13143,10 @@ test_ipv6_ra 2 $src_mac $src_lla "$ra" 1500 $prefix "1000::11" "aa.bb.cc" "$rout check_packets 2 # Set the address mode to dhcpv6_stateful, router_preference to HIGH -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode=dhcpv6_stateful -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:router_preference="HIGH" -ovn-nbctl --wait=hv remove Logical_Router_Port lrp0 ipv6_ra_configs rdnss -ovn-nbctl --wait=hv remove Logical_Router_Port lrp0 ipv6_ra_configs route_info +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode=dhcpv6_stateful +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:router_preference="HIGH" +check ovn-nbctl --wait=hv remove Logical_Router_Port lrp0 ipv6_ra_configs rdnss +check ovn-nbctl --wait=hv remove Logical_Router_Port lrp0 ipv6_ra_configs route_info # Make sure that ovn-controller has installed the corresponding OF Flow. OVS_WAIT_UNTIL([test 1 = `as hv1 ovs-ofctl dump-flows br-int | grep -c "ipv6_dst=ff02::2,nw_ttl=255,icmp_type=133,icmp_code=0"`]) @@ -13159,9 +13159,9 @@ test_ipv6_ra 3 $src_mac $src_lla "$ra" 1500 $prefix "" "aa.bb.cc" "" check_packets 3 # Set the address mode to dhcpv6_stateless, reset router preference to default -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode=dhcpv6_stateless -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:router_preference="MEDIUM" -ovn-nbctl --wait=hv remove Logical_Router_Port lrp0 ipv6_ra_configs dnssl +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode=dhcpv6_stateless +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:router_preference="MEDIUM" +check ovn-nbctl --wait=hv remove Logical_Router_Port lrp0 ipv6_ra_configs dnssl # Make sure that ovn-controller has installed the corresponding OF Flow. OVS_WAIT_UNTIL([test 1 = `as hv1 ovs-ofctl dump-flows br-int | grep -c "ipv6_dst=ff02::2,nw_ttl=255,icmp_type=133,icmp_code=0"`]) @@ -13173,7 +13173,7 @@ test_ipv6_ra 1 $src_mac $src_lla "$ra" 1500 $prefix "" "" "" check_packets 1 # Set the address mode to invalid. -ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode=invalid +check ovn-nbctl --wait=hv set Logical_Router_Port lrp0 ipv6_ra_configs:address_mode=invalid # Make sure that ovn-controller has not installed any OF Flow for IPv6 ND RA. OVS_WAIT_UNTIL([test 0 = `as hv1 ovs-ofctl dump-flows br-int | grep -c "ipv6_dst=ff02::2,nw_ttl=255,icmp_type=133,icmp_code=0"`]) @@ -13203,31 +13203,31 @@ ovn_start # R1 connects to 'alice' with a /32 IP address. We use static routes and # nexthop to push traffic to a logical port in switch 'alice' -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add foo -ovn-nbctl ls-add alice +check ovn-nbctl ls-add foo +check ovn-nbctl ls-add alice # Connect foo to R1 -ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ +check ovn-nbctl lrp-add R1 foo 00:00:00:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add foo rp-foo -- set Logical_Switch_Port rp-foo type=router \ options:router-port=foo addresses=\"00:00:00:01:02:03\" # Connect alice to R1. -ovn-nbctl lrp-add R1 alice 00:00:00:01:02:04 172.16.1.1/32 -ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ +check ovn-nbctl lrp-add R1 alice 00:00:00:01:02:04 172.16.1.1/32 +check ovn-nbctl lsp-add alice rp-alice -- set Logical_Switch_Port rp-alice \ type=router options:router-port=alice addresses=\"00:00:00:01:02:04\" # Create logical port foo1 in foo -ovn-nbctl lsp-add foo foo1 \ +check ovn-nbctl lsp-add foo foo1 \ -- lsp-set-addresses foo1 "f0:00:00:01:02:03 192.168.1.2" # Create logical port alice1 in alice -ovn-nbctl lsp-add alice alice1 \ +check ovn-nbctl lsp-add alice alice1 \ -- lsp-set-addresses alice1 "f0:00:00:01:02:04 10.0.0.2" #install default route in R1 to use alice1's IP address as nexthop -ovn-nbctl lr-route-add R1 0.0.0.0/0 10.0.0.2 alice +check ovn-nbctl lr-route-add R1 0.0.0.0/0 10.0.0.2 alice # Create two hypervisor and create OVS ports corresponding to logical ports. net_add n1 @@ -13276,7 +13276,7 @@ packet=${dst_mac}${src_mac}08004500001c0000000040110000${src_ip}${dst_ip}0035111 # mac_bindings table. as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet wait_row_count MAC_Binding 1 ip="10.0.0.2" -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Packet to Expect at 'alice1' src_mac="000000010204" @@ -13296,12 +13296,12 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([2 HVs, 1 lport/HV, localport ports]) ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 # Add localport to the switch -ovn-nbctl lsp-add ls1 lp01 -ovn-nbctl lsp-set-addresses lp01 f0:00:00:00:00:01 -ovn-nbctl lsp-set-type lp01 localport +check ovn-nbctl lsp-add ls1 lp01 +check ovn-nbctl lsp-set-addresses lp01 f0:00:00:00:00:01 +check ovn-nbctl lsp-set-type lp01 localport net_add n1 @@ -13330,7 +13330,7 @@ for i in 1 2; do done wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-sbctl dump-flows OVN_POPULATE_ARP @@ -13634,7 +13634,7 @@ ovn_attach n1 br-phys 192.168.0.1 # enable vlan transparency to disable local arp responder and allow ovn deliver # the request to the other side -ovn-nbctl ls-add ls -- add Logical_Switch ls other_config vlan-passthru=true +check ovn-nbctl ls-add ls -- add Logical_Switch ls other_config vlan-passthru=true check ovn-nbctl lsp-add ls lp check ovn-nbctl lsp-set-addresses lp "00:00:00:00:00:01 10.0.0.1" @@ -13693,8 +13693,8 @@ for i in 1 2; do ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys done -ovn-nbctl ls-add inside -ovn-nbctl ls-add outside +check ovn-nbctl ls-add inside +check ovn-nbctl ls-add outside # create hypervisors with a vif port each to an internal network @@ -13719,13 +13719,13 @@ OVN_POPULATE_ARP ovn-nbctl create Logical_Router name=R1 # Connect inside to R1 -ovn-nbctl lrp-add R1 inside 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add inside rp-inside -- set Logical_Switch_Port rp-inside \ +check ovn-nbctl lrp-add R1 inside 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add inside rp-inside -- set Logical_Switch_Port rp-inside \ type=router options:router-port=inside \ -- lsp-set-addresses rp-inside router # Connect outside to R1 as distributed router gateway port on gw1+gw2 -ovn-nbctl lrp-add R1 outside 00:00:02:01:02:04 192.168.0.101/24 +check ovn-nbctl lrp-add R1 outside 00:00:02:01:02:04 192.168.0.101/24 ovn-nbctl --id=@gc0 create Gateway_Chassis \ name=outside_gw1 chassis_name=gw1 priority=20 -- \ @@ -13733,15 +13733,15 @@ ovn-nbctl --id=@gc0 create Gateway_Chassis \ name=outside_gw2 chassis_name=gw2 priority=10 -- \ set Logical_Router_Port outside 'gateway_chassis=[@gc0,@gc1]' -ovn-nbctl lsp-add outside rp-outside -- set Logical_Switch_Port rp-outside \ +check ovn-nbctl lsp-add outside rp-outside -- set Logical_Switch_Port rp-outside \ type=router options:router-port=outside \ -- lsp-set-addresses rp-outside router # Create localnet port in outside -ovn-nbctl lsp-add outside ln-outside -ovn-nbctl lsp-set-addresses ln-outside unknown -ovn-nbctl lsp-set-type ln-outside localnet -ovn-nbctl lsp-set-options ln-outside network_name=phys +check ovn-nbctl lsp-add outside ln-outside +check ovn-nbctl lsp-set-addresses ln-outside unknown +check ovn-nbctl lsp-set-type ln-outside localnet +check ovn-nbctl lsp-set-options ln-outside network_name=phys # Allow some time for ovn-northd and ovn-controller to catch up. wait_for_ports_up @@ -13961,7 +13961,7 @@ grep "dl_dst=00:00:02:01:02:04" | wc -l], [0], [[0 # check that the chassis redirect port has been reclaimed by the gw1 chassis wait_row_count Port_Binding 1 logical_port=cr-outside chassis=$gw1_chassis -ovn-nbctl --wait=hv set NB_Global . options:"bfd-min-rx"=2000 +check ovn-nbctl --wait=hv set NB_Global . options:"bfd-min-rx"=2000 as gw2 for chassis in gw1 hv1 hv2; do echo "checking gw2 -> $chassis" @@ -13970,7 +13970,7 @@ for chassis in gw1 hv1 hv2; do test "$bfd_cfg" = "check_tnl_key=true enable=true min_rx=2000" ]) done -ovn-nbctl --wait=hv set NB_Global . options:"bfd-min-tx"=1500 +check ovn-nbctl --wait=hv set NB_Global . options:"bfd-min-tx"=1500 for chassis in gw1 hv1 hv2; do echo "checking gw2 -> $chassis" OVS_WAIT_UNTIL([ @@ -13978,8 +13978,8 @@ for chassis in gw1 hv1 hv2; do test "$bfd_cfg" = "check_tnl_key=true enable=true min_rx=2000 min_tx=1500" ]) done -ovn-nbctl remove NB_Global . options "bfd-min-rx" -ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 +check ovn-nbctl remove NB_Global . options "bfd-min-rx" +check ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 for chassis in gw1 hv1 hv2; do echo "checking gw2 -> $chassis" OVS_WAIT_UNTIL([ @@ -14004,24 +14004,24 @@ as hv2 ovs-vsctl del-port hv2-vif1 wait_column '' HA_Chassis_Group ref_chassis # Delete the Gateway_Chassis for lrp - outside -ovn-nbctl clear Logical_Router_Port outside gateway_chassis +check ovn-nbctl clear Logical_Router_Port outside gateway_chassis # There shoud be no ha_chassis_group rows in SB DB. wait_row_count HA_Chassis_Group 0 wait_row_count HA_Chassis 0 -ovn-nbctl remove NB_Global . options "bfd-min-rx" -ovn-nbctl remove NB_Global . options "bfd-min-tx" -ovn-nbctl remove NB_Global . options "bfd-mult" +check ovn-nbctl remove NB_Global . options "bfd-min-rx" +check ovn-nbctl remove NB_Global . options "bfd-min-tx" +check ovn-nbctl remove NB_Global . options "bfd-mult" # Now test with HA chassis group instead of Gateway chassis in NB DB -ovn-nbctl --wait=sb ha-chassis-group-add hagrp1 +check ovn-nbctl --wait=sb ha-chassis-group-add hagrp1 ovn-nbctl list ha_chassis_group ovn-nbctl --bare --columns _uuid find ha_chassis_group name=hagrp1 hagrp1_uuid=`ovn-nbctl --bare --columns _uuid find ha_chassis_group name=hagrp1` -ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 gw1 30 -ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 gw2 20 +check ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 gw1 30 +check ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 gw2 20 # ovn-northd should not create HA chassis group and HA chassis rows # unless the HA chassis group in OVN NB DB is associated to @@ -14029,7 +14029,7 @@ ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 gw2 20 wait_row_count HA_Chassis 0 # Associate hagrp1 to outside logical router port -ovn-nbctl set Logical_Router_Port outside ha_chassis_group=$hagrp1_uuid +check ovn-nbctl set Logical_Router_Port outside ha_chassis_group=$hagrp1_uuid wait_row_count HA_Chassis_Group 1 wait_row_count HA_Chassis 2 @@ -14088,7 +14088,7 @@ exp_ref_ch_list="$hv1_ch_uuid $hv2_ch_uuid" wait_column "$exp_ref_ch_list" HA_Chassis_Group ref_chassis # Increase the priority of gw2 -ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 gw2 40 +check ovn-nbctl --wait=sb ha-chassis-group-add-chassis hagrp1 gw2 40 OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_REMOTE_OUTPUT | \ grep active_backup | grep members:$hv1_gw2_ofport,$hv1_gw1_ofport \ @@ -14173,10 +14173,10 @@ AT_CLEANUP OVN_FOR_EACH_NORTHD([ AT_SETUP([send gratuitous ARP for NAT rules on HA distributed router]) ovn_start -ovn-nbctl ls-add ls0 -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls0 +check ovn-nbctl ls-add ls1 ovn-nbctl create Logical_Router name=lr0 -ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.100/24 +check ovn-nbctl lrp-add lr0 lrp0 f0:00:00:00:00:01 192.168.0.100/24 ovn-nbctl --id=@gc0 create Gateway_Chassis \ name=outside_gw1 chassis_name=hv2 priority=10 -- \ @@ -14184,10 +14184,10 @@ ovn-nbctl --id=@gc0 create Gateway_Chassis \ name=outside_gw2 chassis_name=hv3 priority=1 -- \ set Logical_Router_Port lrp0 'gateway_chassis=[@gc0,@gc1]' -ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ +check ovn-nbctl lsp-add ls0 lrp0-rp -- set Logical_Switch_Port lrp0-rp \ type=router options:router-port=lrp0 addresses="router" -ovn-nbctl lrp-add lr0 lrp1 f0:00:00:00:00:02 10.0.0.1/24 -ovn-nbctl lsp-add ls1 lrp1-rp -- set Logical_Switch_Port lrp1-rp \ +check ovn-nbctl lrp-add lr0 lrp1 f0:00:00:00:00:02 10.0.0.1/24 +check ovn-nbctl lsp-add ls1 lrp1-rp -- set Logical_Switch_Port lrp1-rp \ type=router options:router-port=lrp1 addresses="router" # Add NAT rules @@ -14232,7 +14232,7 @@ as hv2 reset_pcap_file br-phys_n1 hv2/br-phys_n1 as hv3 reset_pcap_file br-phys_n1 hv3/br-phys_n1 as hv1 reset_pcap_file snoopvif hv1/snoopvif # add nat-addresses option -ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" +check ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" only_broadcast_from_lrp1() { grep "fffffffffffff00000000001" @@ -14285,7 +14285,7 @@ grep "actions=mod_vlan_vid:2014" | wc -l` ]) # update nat-addresses option -ovn-nbctl --wait=hv clear logical_switch_port lrp0-rp options +check ovn-nbctl --wait=hv clear logical_switch_port lrp0-rp options #Wait until the Port_Binding.nat_addresses is cleared. OVS_WAIT_UNTIL([test 0 = `ovn-sbctl --bare --columns nat_addresses find port_binding \ @@ -14295,7 +14295,7 @@ as hv2 reset_pcap_file br-phys_n1 hv2/br-phys_n1 as hv3 reset_pcap_file br-phys_n1 hv3/br-phys_n1 as hv1 reset_pcap_file snoopvif hv1/snoopvif -ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" +check ovn-nbctl --wait=hv lsp-set-options lrp0-rp router-port=lrp0 nat-addresses="router" #Wait until the Port_Binding.nat_addresses is set. OVS_WAIT_UNTIL([test 1 = `ovn-sbctl --bare --columns nat_addresses find port_binding \ @@ -14332,8 +14332,8 @@ for i in 1 2; do ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys done -ovn-nbctl ls-add inside -ovn-nbctl ls-add outside +check ovn-nbctl ls-add inside +check ovn-nbctl ls-add outside # create one hypervisors with a vif port the internal network sim_add hv1 @@ -14346,7 +14346,7 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \ options:rxq_pcap=hv1/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl lsp-add inside inside1 \ +check ovn-nbctl lsp-add inside inside1 \ -- lsp-set-addresses inside1 "f0:00:00:01:22:01 192.168.1.101" @@ -14355,13 +14355,13 @@ OVN_POPULATE_ARP ovn-nbctl create Logical_Router name=R1 # Connect inside to R1 -ovn-nbctl lrp-add R1 inside 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add inside rp-inside -- set Logical_Switch_Port rp-inside \ +check ovn-nbctl lrp-add R1 inside 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add inside rp-inside -- set Logical_Switch_Port rp-inside \ type=router options:router-port=inside \ -- lsp-set-addresses rp-inside router # Connect outside to R1 as distributed router gateway port on gw1+gw2 -ovn-nbctl lrp-add R1 outside 00:00:02:01:02:04 192.168.0.101/24 +check ovn-nbctl lrp-add R1 outside 00:00:02:01:02:04 192.168.0.101/24 ovn-nbctl --id=@gc0 create Gateway_Chassis \ name=outside_gw1 chassis_name=gw1 priority=20 -- \ @@ -14369,15 +14369,15 @@ ovn-nbctl --id=@gc0 create Gateway_Chassis \ name=outside_gw2 chassis_name=gw2 priority=10 -- \ set Logical_Router_Port outside 'gateway_chassis=[@gc0,@gc1]' -ovn-nbctl lsp-add outside rp-outside -- set Logical_Switch_Port rp-outside \ +check ovn-nbctl lsp-add outside rp-outside -- set Logical_Switch_Port rp-outside \ type=router options:router-port=outside \ -- lsp-set-addresses rp-outside router # Create localnet port in outside -ovn-nbctl lsp-add outside ln-outside -ovn-nbctl lsp-set-addresses ln-outside unknown -ovn-nbctl lsp-set-type ln-outside localnet -ovn-nbctl lsp-set-options ln-outside network_name=phys +check ovn-nbctl lsp-add outside ln-outside +check ovn-nbctl lsp-set-addresses ln-outside unknown +check ovn-nbctl lsp-set-type ln-outside localnet +check ovn-nbctl lsp-set-options ln-outside network_name=phys # Allow some time for ovn-northd and ovn-controller to catch up. wait_for_ports_up @@ -14546,29 +14546,29 @@ AT_SETUP([IPv6 Neighbor Solicitation for unknown MAC]) AT_KEYWORDS([ovn-nd_ns for unknown mac]) ovn_start -ovn-nbctl ls-add sw0_ip6 -ovn-nbctl lsp-add sw0_ip6 sw0_ip6-port1 -ovn-nbctl lsp-set-addresses sw0_ip6-port1 \ +check ovn-nbctl ls-add sw0_ip6 +check ovn-nbctl lsp-add sw0_ip6 sw0_ip6-port1 +check ovn-nbctl lsp-set-addresses sw0_ip6-port1 \ "50:64:00:00:00:02 aef0::5264:00ff:fe00:0002" -ovn-nbctl lsp-set-port-security sw0_ip6-port1 \ +check ovn-nbctl lsp-set-port-security sw0_ip6-port1 \ "50:64:00:00:00:02 aef0::5264:00ff:fe00:0002" -ovn-nbctl lr-add lr0_ip6 -ovn-nbctl lrp-add lr0_ip6 lrp0_ip6 00:00:00:00:af:01 aef0:0:0:0:0:0:0:0/64 -ovn-nbctl lsp-add sw0_ip6 lrp0_ip6-attachment -ovn-nbctl lsp-set-type lrp0_ip6-attachment router -ovn-nbctl lsp-set-addresses lrp0_ip6-attachment router -ovn-nbctl lsp-set-options lrp0_ip6-attachment router-port=lrp0_ip6 -ovn-nbctl set logical_router_port lrp0_ip6 ipv6_ra_configs:address_mode=slaac - -ovn-nbctl ls-add public -ovn-nbctl lsp-add public ln-public -ovn-nbctl lsp-set-addresses ln-public unknown -ovn-nbctl lsp-set-type ln-public localnet -ovn-nbctl lsp-set-options ln-public network_name=phys - -ovn-nbctl lrp-add lr0_ip6 ip6_public 00:00:02:01:02:04 \ +check ovn-nbctl lr-add lr0_ip6 +check ovn-nbctl lrp-add lr0_ip6 lrp0_ip6 00:00:00:00:af:01 aef0:0:0:0:0:0:0:0/64 +check ovn-nbctl lsp-add sw0_ip6 lrp0_ip6-attachment +check ovn-nbctl lsp-set-type lrp0_ip6-attachment router +check ovn-nbctl lsp-set-addresses lrp0_ip6-attachment router +check ovn-nbctl lsp-set-options lrp0_ip6-attachment router-port=lrp0_ip6 +check ovn-nbctl set logical_router_port lrp0_ip6 ipv6_ra_configs:address_mode=slaac + +check ovn-nbctl ls-add public +check ovn-nbctl lsp-add public ln-public +check ovn-nbctl lsp-set-addresses ln-public unknown +check ovn-nbctl lsp-set-type ln-public localnet +check ovn-nbctl lsp-set-options ln-public network_name=phys + +check ovn-nbctl lrp-add lr0_ip6 ip6_public 00:00:02:01:02:04 \ 2001:db8:1:0:200:02ff:fe01:0204/64 \ -- lrp-set-gateway-chassis ip6_public hv1 @@ -14577,26 +14577,26 @@ ovn-nbctl -- --id=@lrt create Logical_Router_Static_Route \ ip_prefix="\:\:/0" nexthop="2001\:db8\:1\:0\:200\:02ff\:fe01\:1305" \ -- add Logical_Router lr0_ip6 static_routes @lrt -ovn-nbctl lsp-add public rp-ip6_public -- set Logical_Switch_Port \ +check ovn-nbctl lsp-add public rp-ip6_public -- set Logical_Switch_Port \ rp-ip6_public type=router options:router-port=ip6_public \ -- lsp-set-addresses rp-ip6_public router # Add a second router connected to "public" and make sure the NS packets # from the first router are not looped on the pysical network and # don't cross routing domains. -ovn-nbctl ls-add sw1_ip6 -ovn-nbctl lsp-add sw1_ip6 sw1_ip6-port1 -ovn-nbctl lsp-set-addresses sw1_ip6-port1 \ +check ovn-nbctl ls-add sw1_ip6 +check ovn-nbctl lsp-add sw1_ip6 sw1_ip6-port1 +check ovn-nbctl lsp-set-addresses sw1_ip6-port1 \ "50:64:00:00:01:02 aef1::5264:00ff:fe00:0002" -ovn-nbctl lr-add lr1_ip6 +check ovn-nbctl lr-add lr1_ip6 check ovn-nbctl lrp-add lr1_ip6 lrp1_ip6 00:00:00:01:af:01 aef1:0:0:0:0:0:0:0/64 -ovn-nbctl lsp-add sw1_ip6 lrp1_ip6-attachment -ovn-nbctl lsp-set-type lrp1_ip6-attachment router -ovn-nbctl lsp-set-addresses lrp1_ip6-attachment router -ovn-nbctl lsp-set-options lrp1_ip6-attachment router-port=lrp1_ip6 +check ovn-nbctl lsp-add sw1_ip6 lrp1_ip6-attachment +check ovn-nbctl lsp-set-type lrp1_ip6-attachment router +check ovn-nbctl lsp-set-addresses lrp1_ip6-attachment router +check ovn-nbctl lsp-set-options lrp1_ip6-attachment router-port=lrp1_ip6 -ovn-nbctl lrp-add lr1_ip6 ip6_public_1 00:01:02:01:02:04 \ +check ovn-nbctl lrp-add lr1_ip6 ip6_public_1 00:01:02:01:02:04 \ 2002:db8:1:0:200:02ff:fe01:0204/64 \ -- lrp-set-gateway-chassis ip6_public_1 hv2 @@ -14605,7 +14605,7 @@ ovn-nbctl -- --id=@lrt create Logical_Router_Static_Route \ ip_prefix="\:\:/0" nexthop="2002\:db8\:1\:0\:200\:02ff\:fe01\:1305" \ -- add Logical_Router lr1_ip6 static_routes @lrt -ovn-nbctl lsp-add public rp-ip6_public_1 -- set Logical_Switch_Port \ +check ovn-nbctl lsp-add public rp-ip6_public_1 -- set Logical_Switch_Port \ rp-ip6_public_1 type=router options:router-port=ip6_public_1 \ -- lsp-set-addresses rp-ip6_public_1 router @@ -14634,7 +14634,7 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \ ofport-request=1 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync wait_for_ports_up ovn-sbctl dump-flows > sbflows @@ -15212,7 +15212,7 @@ OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-i # Still, this does not guarantee that all flows are installed on hv3: hv3 (might) still need to receive and handle # additional_chassis for migrator port -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # check that... # unicast from First arrives to hv1:Migrator @@ -15301,7 +15301,7 @@ wait_column "" Port_Binding requested_additional_chassis logical_port=migrator OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"']) # Give time for hv3 to handle the change of Port_Binding for migrator port -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # check that... # unicast from Third doesn't arrive to hv1:Migrator @@ -16474,8 +16474,8 @@ ovn_start net_add n1 -ovn-nbctl ls-add ls0 -ovn-nbctl lsp-add ls0 lsp0 +check ovn-nbctl ls-add ls0 +check ovn-nbctl lsp-add ls0 lsp0 # create two hypervisors, each with one vif port sim_add hv1 @@ -16491,7 +16491,7 @@ ovn_attach n1 br-phys 192.168.0.12 ovs-vsctl -- add-port br-int hv2-vif0 # Allow only chassis hv1 to bind logical port lsp0. -ovn-nbctl lsp-set-options lsp0 requested-chassis=hv1 +check ovn-nbctl lsp-set-options lsp0 requested-chassis=hv1 # Allow some time for ovn-northd and ovn-controller to catch up. check ovn-nbctl --wait=hv sync @@ -16541,7 +16541,7 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_LOG_TO_PHY | grep act # the requested chassis for lsp0 is changed from hv1 to hv2. echo "verifying that lsp0 binding moves when requested-chassis is changed" -ovn-nbctl lsp-set-options lsp0 requested-chassis=hv2 +check ovn-nbctl lsp-set-options lsp0 requested-chassis=hv2 # We might see multiple "Releasing lport ...", when sb is read only OVS_WAIT_UNTIL([test 1 -le $(grep -c "Releasing lport lsp0" hv1/ovn-controller.log)]) @@ -16564,10 +16564,10 @@ AT_SETUP([tug-of-war between two chassis for the same port]) TAG_UNSTABLE ovn_start -ovn-nbctl ls-add ls0 -ovn-nbctl lsp-add ls0 lsp0 -ovn-nbctl lsp-add ls0 lsp1 -ovn-nbctl lsp-add ls0 lsp2 +check ovn-nbctl ls-add ls0 +check ovn-nbctl lsp-add ls0 lsp0 +check ovn-nbctl lsp-add ls0 lsp1 +check ovn-nbctl lsp-add ls0 lsp2 check ovn-nbctl lsp-add ls0 lsp-cont1 lsp0 1 @@ -16615,8 +16615,8 @@ AT_SETUP([options:requested-chassis with hostname]) ovn_start -ovn-nbctl ls-add ls0 -ovn-nbctl lsp-add ls0 lsp0 +check ovn-nbctl ls-add ls0 +check ovn-nbctl lsp-add ls0 lsp0 net_add n1 sim_add hv1 @@ -16681,23 +16681,23 @@ as hv2 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.3 -ovn-nbctl lr-add ro -ovn-nbctl lrp-add ro ro-sw 00:00:00:00:00:01 aef0:0:0:0:0:0:0:1/64 +check ovn-nbctl lr-add ro +check ovn-nbctl lrp-add ro ro-sw 00:00:00:00:00:01 aef0:0:0:0:0:0:0:1/64 -ovn-nbctl ls-add sw -ovn-nbctl lsp-add sw sw-ro -ovn-nbctl lsp-set-type sw-ro router -ovn-nbctl lsp-set-options sw-ro router-port=ro-sw -ovn-nbctl lsp-set-addresses sw-ro 00:00:00:00:00:01 -ovn-nbctl lsp-add sw sw-p1 -ovn-nbctl lsp-set-addresses sw-p1 "00:00:00:00:00:02 aef0::200:ff:fe00:2" -ovn-nbctl lsp-add sw sw-p2 -ovn-nbctl lsp-set-addresses sw-p2 "00:00:00:00:00:03 aef0::200:ff:fe00:3" +check ovn-nbctl ls-add sw +check ovn-nbctl lsp-add sw sw-ro +check ovn-nbctl lsp-set-type sw-ro router +check ovn-nbctl lsp-set-options sw-ro router-port=ro-sw +check ovn-nbctl lsp-set-addresses sw-ro 00:00:00:00:00:01 +check ovn-nbctl lsp-add sw sw-p1 +check ovn-nbctl lsp-set-addresses sw-p1 "00:00:00:00:00:02 aef0::200:ff:fe00:2" +check ovn-nbctl lsp-add sw sw-p2 +check ovn-nbctl lsp-set-addresses sw-p2 "00:00:00:00:00:03 aef0::200:ff:fe00:3" -ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:send_periodic=true -ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:address_mode=slaac -ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:max_interval=4 -ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:min_interval=3 +check ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:send_periodic=true +check ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:address_mode=slaac +check ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:max_interval=4 +check ovn-nbctl set Logical_Router_Port ro-sw ipv6_ra_configs:min_interval=3 for i in 1 2 ; do as hv$i @@ -16792,38 +16792,38 @@ echo "Baseline test with no MTU" ra_test 0 00 0 0 0 c0 40 aef00000000000000000000000000000 echo "Now make sure an MTU option makes it" -ovn-nbctl --wait=hv set Logical_Router_Port ro-sw ipv6_ra_configs:mtu=1500 +check ovn-nbctl --wait=hv set Logical_Router_Port ro-sw ipv6_ra_configs:mtu=1500 ra_test 000005dc 00 0 0 0 c0 40 aef00000000000000000000000000000 echo "Now test for multiple network prefixes" -ovn-nbctl --wait=hv set Logical_Router_port ro-sw networks='aef0\:\:1/64 fd0f\:\:1/48' +check ovn-nbctl --wait=hv set Logical_Router_port ro-sw networks='aef0\:\:1/64 fd0f\:\:1/48' ra_test 000005dc 00 0 0 0 c0 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 echo "Test PRF for default gw" -ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:router_preference="LOW" +check ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:router_preference="LOW" ra_test 000005dc 18 0 0 0 c0 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 echo "Now test for RDNSS" -ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:rdnss='aef0::11' +check ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:rdnss='aef0::11' dns_addr=aef00000000000000000000000000011 ra_test 000005dc 18 $dns_addr 0 0 c0 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 echo "Now test for DNSSL" -ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:dnssl="aa.bb.cc" -ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:router_preference="HIGH" +check ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:dnssl="aa.bb.cc" +check ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:router_preference="HIGH" dnssl=02616102626202636300000000000000 ra_test 000005dc 08 $dns_addr $dnssl 0 c0 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 echo "Now test Route Info option" -ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:route_info="HIGH-aef1::11/48,LOW-aef2::11/96" +check ovn-nbctl --wait=hv set Logical_Router_port ro-sw ipv6_ra_configs:route_info="HIGH-aef1::11/48,LOW-aef2::11/96" route_info=18023008ffffffffaef100000000000018036018ffffffffaef20000000000000000000000000000 ra_test 000005dc 08 $dns_addr $dnssl $route_info c0 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 echo "Test a different address mode now" -ovn-nbctl --wait=hv set Logical_Router_Port ro-sw ipv6_ra_configs:address_mode=dhcpv6_stateful +check ovn-nbctl --wait=hv set Logical_Router_Port ro-sw ipv6_ra_configs:address_mode=dhcpv6_stateful ra_test 000005dc 88 $dns_addr $dnssl $route_info 80 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 echo "And the other address mode" -ovn-nbctl --wait=hv set Logical_Router_Port ro-sw ipv6_ra_configs:address_mode=dhcpv6_stateless +check ovn-nbctl --wait=hv set Logical_Router_Port ro-sw ipv6_ra_configs:address_mode=dhcpv6_stateless ra_test 000005dc 48 $dns_addr $dnssl $route_info c0 40 aef00000000000000000000000000000 30 fd0f0000000000000000000000000000 OVN_CLEANUP([hv1],[hv2]) @@ -17294,7 +17294,7 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \ options:rxq_pcap=hv2/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 check ovn-nbctl lsp-add sw0 sw0-p1 check ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3 1000::3" @@ -17309,7 +17309,7 @@ check ovn-nbctl acl-add sw0 to-lport 1002 ip reject OVN_POPULATE_ARP wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Get the OF table numbers acl_eval=$(ovn-debug lflow-stage-to-oftable ls_out_acl_eval) @@ -17365,33 +17365,33 @@ ovn_start # One LR - R1 has switch ls1 (191.168.1.0/24) connected to it, # and has switch ls2 (172.16.1.0/24) connected to it. -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ +check ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ type=router options:router-port=ls1 addresses=\"00:00:00:01:02:f1\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ +check ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ type=router options:router-port=ls2 addresses=\"00:00:00:01:02:f2\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "00:00:00:01:02:03 192.168.1.2" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "00:00:00:01:02:04 172.16.1.2" -ovn-nbctl lsp-add ls1 ln-public -ovn-nbctl lsp-set-type ln-public localnet -ovn-nbctl lsp-set-addresses ln-public unknown -ovn-nbctl lsp-set-options ln-public network_name=public +check ovn-nbctl lsp-add ls1 ln-public +check ovn-nbctl lsp-set-type ln-public localnet +check ovn-nbctl lsp-set-addresses ln-public unknown +check ovn-nbctl lsp-set-options ln-public network_name=public # Create one hypervisor and create OVS ports corresponding to logical ports. net_add n1 @@ -17619,11 +17619,11 @@ AT_SETUP([Mirror - local]) AT_KEYWORDS([Mirror]) ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "00:00:00:01:01:02 10.0.0.2" -ovn-nbctl lsp-add ls1 ls1-lp2 \ +check ovn-nbctl lsp-add ls1 ls1-lp2 \ -- lsp-set-addresses ls1-lp2 "00:00:00:01:01:03 10.0.0.3" net_add n1 @@ -17725,41 +17725,41 @@ ovn_start # One LR - R1 has switch ls1 (191.168.1.0/24) connected to it, # and has switch ls2 (172.16.1.0/24) connected to it. -ovn-nbctl lr-add R1 +check ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ +check ovn-nbctl lrp-add R1 ls1 00:00:00:01:02:f1 192.168.1.1/24 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ type=router options:router-port=ls1 addresses=\"00:00:00:01:02:f1\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ +check ovn-nbctl lrp-add R1 ls2 00:00:00:01:02:f2 172.16.1.1/24 +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ type=router options:router-port=ls2 addresses=\"00:00:00:01:02:f2\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "00:00:00:01:02:03 192.168.1.2" # Create logical port ls1-lp2 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp2 \ +check ovn-nbctl lsp-add ls1 ls1-lp2 \ -- lsp-set-addresses ls1-lp2 "00:00:00:01:03:03 192.168.1.3" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "00:00:00:01:02:04 172.16.1.2" # Create logical port ls2-lp2 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp2 \ +check ovn-nbctl lsp-add ls2 ls2-lp2 \ -- lsp-set-addresses ls2-lp2 "00:00:00:01:03:04 172.16.1.3" -ovn-nbctl lsp-add ls1 ln-public -ovn-nbctl lsp-set-type ln-public localnet -ovn-nbctl lsp-set-addresses ln-public unknown -ovn-nbctl lsp-set-options ln-public network_name=public +check ovn-nbctl lsp-add ls1 ln-public +check ovn-nbctl lsp-set-type ln-public localnet +check ovn-nbctl lsp-set-addresses ln-public unknown +check ovn-nbctl lsp-set-options ln-public network_name=public # Create 2 hypervisors and create OVS ports corresponding to logical ports for hv1. net_add n1 @@ -18061,7 +18061,7 @@ for i in 1 2 3; do done done -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 for i in 1 2 3; do for j in 1 2 3; do ovn-nbctl lrp-add lr0 lrp$i$j 00:00:00:00:ff:$i$j 192.168.$i$j.254/24 @@ -18078,8 +18078,8 @@ ovn-nbctl create Port_Group name=pg2 ports="$pg2_ports" # create ACLs on ls1 and ls2 (where ports of pg1 reside) to drop all traffic # from pg2 to pg1 -ovn-nbctl acl-add ls1 to-lport 1001 'outport == @pg1 && ip4.src == $pg2_ip4' drop -ovn-nbctl acl-add ls2 to-lport 1001 'outport == @pg1 && ip4.src == $pg2_ip4' drop +check ovn-nbctl acl-add ls1 to-lport 1001 'outport == @pg1 && ip4.src == $pg2_ip4' drop +check ovn-nbctl acl-add ls2 to-lport 1001 'outport == @pg1 && ip4.src == $pg2_ip4' drop # Physical network: # @@ -18281,7 +18281,7 @@ for i in 1 2 3; do done done -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 for i in 1 2 3; do for j in 1 2 3; do ovn-nbctl lrp-add lr0 lrp$i$j 00:00:00:00:ff:$i$j 192.168.$i$j.254/24 @@ -18297,8 +18297,8 @@ ovn-nbctl create Port_Group name=pg1 ports="$pg1_ports" ovn-nbctl create Port_Group name=pg2 ports="$pg2_ports" # create ACLs on pg1 to drop traffic from pg2 to pg1 -ovn-nbctl acl-add pg1 to-lport 1001 'outport == @pg1' drop -ovn-nbctl --type=port-group acl-add pg1 to-lport 1002 \ +check ovn-nbctl acl-add pg1 to-lport 1001 'outport == @pg1' drop +check ovn-nbctl --type=port-group acl-add pg1 to-lport 1002 \ 'outport == @pg1 && ip4.src == $pg2_ip4' allow-related # Physical network: @@ -18510,15 +18510,15 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([Address Set generation from Port Groups (static addressing)]) ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 lp1 -ovn-nbctl lsp-add ls1 lp2 -ovn-nbctl lsp-add ls1 lp3 +check ovn-nbctl lsp-add ls1 lp1 +check ovn-nbctl lsp-add ls1 lp2 +check ovn-nbctl lsp-add ls1 lp3 -ovn-nbctl lsp-set-addresses lp1 "02:00:00:00:00:01 10.0.0.1 2001:db8::1" -ovn-nbctl lsp-set-addresses lp2 "02:00:00:00:00:02 10.0.0.2 2001:db8::2" -ovn-nbctl lsp-set-addresses lp3 "02:00:00:00:00:03 10.0.0.3 2001:db8::3" +check ovn-nbctl lsp-set-addresses lp1 "02:00:00:00:00:01 10.0.0.1 2001:db8::1" +check ovn-nbctl lsp-set-addresses lp2 "02:00:00:00:00:02 10.0.0.2 2001:db8::2" +check ovn-nbctl lsp-set-addresses lp3 "02:00:00:00:00:03 10.0.0.3 2001:db8::3" ovn-nbctl create Port_Group name=pg1 ovn-nbctl create Port_Group name=pg2 @@ -18528,7 +18528,7 @@ ovn-nbctl --id=@p get Logical_Switch_Port lp2 -- add Port_Group pg1 ports @p ovn-nbctl --id=@p get Logical_Switch_Port lp2 -- add Port_Group pg2 ports @p ovn-nbctl --id=@p get Logical_Switch_Port lp3 -- add Port_Group pg2 ports @p -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync dnl Check if port group address sets were populated with ports' addresses check_column '10.0.0.1 10.0.0.2' Address_Set addresses name=pg1_ip4 @@ -18536,7 +18536,7 @@ check_column '10.0.0.2 10.0.0.3' Address_Set addresses name=pg2_ip4 check_column '2001:db8::1 2001:db8::2' Address_Set addresses name=pg1_ip6 check_column '2001:db8::2 2001:db8::3' Address_Set addresses name=pg2_ip6 -ovn-nbctl --wait=sb lsp-set-addresses lp1 \ +check ovn-nbctl --wait=sb lsp-set-addresses lp1 \ "02:00:00:00:00:01 10.0.0.11 2001:db8::11" dnl Check if updated address got propagated to the port group address sets @@ -18550,26 +18550,26 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([Address Set generation from Port Groups (dynamic addressing)]) ovn_start -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 -ovn-nbctl ls-add ls3 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls3 -ovn-nbctl set Logical_Switch ls1 \ +check ovn-nbctl set Logical_Switch ls1 \ other_config:subnet=10.1.0.0/24 other_config:ipv6_prefix="2001:db8:1::" -ovn-nbctl set Logical_Switch ls2 \ +check ovn-nbctl set Logical_Switch ls2 \ other_config:subnet=10.2.0.0/24 other_config:ipv6_prefix="2001:db8:2::" # A prefix length may be specified, but only if it is /64. -ovn-nbctl set Logical_Switch ls3 \ +check ovn-nbctl set Logical_Switch ls3 \ other_config:subnet=10.3.0.0/24 other_config:ipv6_prefix="2001:db8:3::/64" -ovn-nbctl lsp-add ls1 lp1 -ovn-nbctl lsp-add ls2 lp2 -ovn-nbctl lsp-add ls3 lp3 +check ovn-nbctl lsp-add ls1 lp1 +check ovn-nbctl lsp-add ls2 lp2 +check ovn-nbctl lsp-add ls3 lp3 -ovn-nbctl lsp-set-addresses lp1 "02:00:00:00:00:01 dynamic" -ovn-nbctl lsp-set-addresses lp2 "02:00:00:00:00:02 dynamic" -ovn-nbctl lsp-set-addresses lp3 "02:00:00:00:00:03 dynamic" +check ovn-nbctl lsp-set-addresses lp1 "02:00:00:00:00:01 dynamic" +check ovn-nbctl lsp-set-addresses lp2 "02:00:00:00:00:02 dynamic" +check ovn-nbctl lsp-set-addresses lp3 "02:00:00:00:00:03 dynamic" ovn-nbctl create Port_Group name=pg1 ovn-nbctl create Port_Group name=pg2 @@ -18579,7 +18579,7 @@ ovn-nbctl --id=@p get Logical_Switch_Port lp2 -- add Port_Group pg1 ports @p ovn-nbctl --id=@p get Logical_Switch_Port lp2 -- add Port_Group pg2 ports @p ovn-nbctl --id=@p get Logical_Switch_Port lp3 -- add Port_Group pg2 ports @p -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync dnl Check if port group address sets were populated with ports' addresses AT_CHECK( @@ -18595,7 +18595,7 @@ AT_CHECK( ]) dnl Check if updated address got propagated to the port group address sets -ovn-nbctl --wait=sb set Logical_Switch ls1 \ +check ovn-nbctl --wait=sb set Logical_Switch ls1 \ other_config:subnet=10.11.0.0/24 other_config:ipv6_prefix="2001:db8:11::" AT_CHECK( [ovn-sbctl get Address_Set pg1_ip4 addresses \ @@ -18616,17 +18616,17 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([ACL conjunction]) ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "f0:00:00:00:00:01 10.0.0.4" -ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4" +check ovn-nbctl lsp-set-port-security ls1-lp1 "f0:00:00:00:00:01 10.0.0.4" -ovn-nbctl lsp-add ls1 ls1-lp2 \ +check ovn-nbctl lsp-add ls1 ls1-lp2 \ -- lsp-set-addresses ls1-lp2 "f0:00:00:00:00:02 10.0.0.6" -ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 10.0.0.6" +check ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 10.0.0.6" net_add n1 sim_add hv1 @@ -18650,7 +18650,7 @@ ovn-nbctl create Address_Set name=set1 \ addresses=\"10.0.0.4\",\"10.0.0.5\",\"10.0.0.6\" ovn-nbctl create Address_Set name=set2 \ addresses=\"10.0.0.7\",\"10.0.0.8\",\"10.0.0.9\" -ovn-nbctl acl-add ls1 to-lport 1001 \ +check ovn-nbctl acl-add ls1 to-lport 1001 \ 'ip4 && ip4.src == $set1 && ip4.dst == $set1' allow check ovn-nbctl --wait=hv acl-add ls1 to-lport 1001 \ 'ip4 && ip4.src == $set1 && ip4.dst == $set2' drop @@ -18708,8 +18708,8 @@ grep conj_id | wc -l`]) as hv1 ovs-ofctl dump-flows br-int # Set the ip address for ls1-lp2 from set2 so that the drop ACL flow is hit. -ovn-nbctl lsp-set-addresses ls1-lp2 "f0:00:00:00:00:02 10.0.0.7 20.0.0.4" -ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 10.0.0.7 20.0.0.4" +check ovn-nbctl lsp-set-addresses ls1-lp2 "f0:00:00:00:00:02 10.0.0.7 20.0.0.4" +check ovn-nbctl lsp-set-port-security ls1-lp2 "f0:00:00:00:00:02 10.0.0.7 20.0.0.4" reset_pcap_file hv1-vif2 hv1/vif2 @@ -18735,7 +18735,7 @@ AT_CHECK([cat 2.packets], [0], []) # priority=2001,ip,metadata=0x1,nw_src=10.0.0.4 actions=conjunction(4,1/2) # priority=2001,ip,metadata=0x1,nw_src=10.0.0.5 actions=conjunction(4,1/2) -ovn-nbctl acl-del ls1 to-lport 1001 \ +check ovn-nbctl acl-del ls1 to-lport 1001 \ 'ip4 && ip4.src == $set1 && ip4.dst == $set1' OVS_WAIT_UNTIL([test 6 = `as hv1 ovs-ofctl dump-flows br-int | \ @@ -18746,10 +18746,10 @@ OVS_WAIT_UNTIL([test 1 = `as hv1 ovs-ofctl dump-flows br-int | \ grep conj_id | wc -l`]) # Add the ACL back -ovn-nbctl acl-add ls1 to-lport 1001 \ +check ovn-nbctl acl-add ls1 to-lport 1001 \ 'ip4 && ip4.src == $set1 && ip4.dst == $set1' allow # Add one more ACL with more overlapping -ovn-nbctl acl-add ls1 to-lport 1001 \ +check ovn-nbctl acl-add ls1 to-lport 1001 \ 'ip4 && ip4.src == $set1 && ip4.dst == {10.0.0.9, 10.0.0.10}' drop # priority=2001,ip,metadata=0x1,nw_dst=10.0.0.8 actions=conjunction(4,1/2) @@ -18771,7 +18771,7 @@ OVS_WAIT_UNTIL([test 3 = `as hv1 ovs-ofctl dump-flows br-int | \ grep conjunction.*conjunction.*conjunction | wc -l`]) # Remove 10.0.0.7 from address set2. All flows should be updated properly. -ovn-nbctl set Address_Set set2 \ +check ovn-nbctl set Address_Set set2 \ addresses=\"10.0.0.8\",\"10.0.0.9\" # priority=2001,ip,metadata=0x1,nw_dst=10.0.0.4 actions=conjunction(9,1/2) @@ -18792,11 +18792,11 @@ OVS_WAIT_UNTIL([test 3 = `as hv1 ovs-ofctl dump-flows br-int | \ grep conjunction.*conjunction.*conjunction | wc -l`]) # Remove an ACL again -ovn-nbctl acl-del ls1 to-lport 1001 \ +check ovn-nbctl acl-del ls1 to-lport 1001 \ 'ip4 && ip4.src == $set1 && ip4.dst == $set1' wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # priority=2001,ip,metadata=0x1,nw_dst=10.0.0.10 actions=conjunction(10,1/2) # priority=2001,ip,metadata=0x1,nw_dst=10.0.0.8 actions=conjunction(11,1/2) # priority=2001,ip,metadata=0x1,nw_dst=10.0.0.9 actions=conjunction(10,1/2),conjunction(11,1/2) @@ -18817,7 +18817,7 @@ old_conj_ids=`as hv1 ovs-ofctl dump-flows br-int | grep conj_id= | \ echo $old_conj_ids as hv1 ovn-appctl -t ovn-controller recompute -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync new_conj_ids=`as hv1 ovs-ofctl dump-flows br-int | grep conj_id= | \ awk -F 'conj_id=' '{ print $2 }' | awk -F ',' '{ print $1 }' | sort` echo $new_conj_ids @@ -18883,11 +18883,11 @@ grep conjunction.*conjunction | wc -l`]) # deletion. (If the order is different, the combined conjunctions order is # different and the action comparison would fail, so won't trigger the tracked # flow merging. We want to make sure that we test the merging scenario) -ovn-nbctl acl-del pg1 to-lport 1000 "outport==@pg1 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" -ovn-nbctl acl-del pg2 to-lport 1000 "outport==@pg2 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" -ovn-nbctl acl-add pg1 to-lport 1000 "outport==@pg1 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" allow -ovn-nbctl acl-add pg2 to-lport 1000 "outport==@pg2 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" allow -ovn-nbctl --wait=hv sync +check ovn-nbctl acl-del pg1 to-lport 1000 "outport==@pg1 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" +check ovn-nbctl acl-del pg2 to-lport 1000 "outport==@pg2 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" +check ovn-nbctl acl-add pg1 to-lport 1000 "outport==@pg1 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" allow +check ovn-nbctl acl-add pg2 to-lport 1000 "outport==@pg2 && ip4 && ip4.src == {10.0.0.1, 10.0.0.2}" allow +check ovn-nbctl --wait=hv sync # Now re-bind p3 and p5 in the same transaction, so that pg1 and pg2 update are # handled in the same I-P engine run. The order of pg1 and pg2 can be random. @@ -18901,7 +18901,7 @@ ovn-nbctl --wait=hv sync # combined conjunctions. ovs-vsctl add-port br-int p3 -- set Interface p3 external_ids:iface-id=p3 -- \ add-port br-int p5 -- set Interface p5 external_ids:iface-id=p5 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Now making sure we end up with two combined conjunctions. OVS_WAIT_UNTIL([test 2 = `as hv1 ovs-ofctl dump-flows br-int | \ @@ -19221,7 +19221,7 @@ check ovs-vsctl -- add-port br-int hv1-vif2 -- \ ovn-nbctl create address_set name=as1 addresses="10.0.0.1" ovn-nbctl create address_set name=as2 addresses="10.0.0.11,10.0.0.12" -ovn-nbctl pg-add pg1 ls1-lp1 ls1-lp2 +check ovn-nbctl pg-add pg1 ls1-lp1 ls1-lp2 # The 1st ACL potentially can generate 2 conjunctions, but as1 has only 1 address, # so it would generate 1 conjunction for now. @@ -19242,7 +19242,7 @@ AT_CHECK([test `ovs-ofctl dump-flows br-int table=$acl_eval | grep -c conj_id` = echo ------- # Add another address in as1, so that the 1st ACL will now generate 2 conjunctions. -ovn-nbctl set address_set as1 addresses="10.0.0.1,10.0.0.2" +check ovn-nbctl set address_set as1 addresses="10.0.0.1,10.0.0.2" check ovn-nbctl --wait=hv sync ovs-ofctl dump-flows br-int table=$acl_eval @@ -19273,7 +19273,7 @@ ovn_start # No ACL for 31 # Validate the allow ACL with and without any stateful rule on lsw0. # -ovn-nbctl ls-add lsw0 +check ovn-nbctl ls-add lsw0 net_add n1 for i in 1 2 3; do sim_add hv$i @@ -19337,7 +19337,7 @@ test_packet() { # Test drop rule # -------------- -ovn-nbctl acl-del lsw0 +check ovn-nbctl acl-del lsw0 check ovn-nbctl --wait=hv --log --severity=info --name=drop-acl acl-add lsw0 to-lport 5000 'outport == @pg1 && eth.src == $set1 && eth.type == 0x1234' drop for sf in 0 1; do if test ${sf} = 1; then @@ -19413,9 +19413,9 @@ OVS_WAIT_UNTIL([check_packets 0], [$at_diff -F'^---' expected received]) # Test allow rule #---------------- -ovn-nbctl acl-del lsw0 +check ovn-nbctl acl-del lsw0 # drop all packets to 11 and 21. -ovn-nbctl acl-add lsw0 to-lport 5000 'outport == @pg1 && eth.src == $set1' drop +check ovn-nbctl acl-add lsw0 to-lport 5000 'outport == @pg1 && eth.src == $set1' drop # allow 0x1234 between 11 and 21 check ovn-nbctl --wait=hv --log --severity=info --name=allow-acl acl-add lsw0 to-lport 6000 'outport == @pg1 && eth.src == $set1 && eth.type == 0x1234' allow for sf in 0 1; do @@ -19547,7 +19547,7 @@ for i in 1 2; do ovs-appctl -t ovn-controller vlog/set file:dbg:pinctrl done -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 for i in 1 2; do ovn-nbctl lrp-add lr0 lrp$i 00:00:00:00:ff:0$i 192.168.$i.254/24 2001:db8:$i::1/64 ovn-nbctl -- lsp-add sw$i lrp$i-attachment \ @@ -19558,7 +19558,7 @@ done OVN_POPULATE_ARP # allow some time for ovn-northd and ovn-controller to catch up. wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync test_ip_packet 1 1 000000000001 00000000ff01 $(ip_to_hex 192 168 1 1) $(ip_to_hex 192 168 2 1) $(ip_to_hex 192 168 1 254) 0000 f87c ea96 yes test_ip6_packet 1 1 000000000001 00000000ff01 20010db8000100000000000000000011 20010db8000200000000000000000011 20010db8000100000000000000000001 1c22 yes @@ -19772,7 +19772,7 @@ for i in 1 2; do ofport-request=$i done -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 for i in 1 2; do ovn-nbctl lrp-add lr0 lrp$i 00:00:00:00:ff:0$i 192.168.$i.254/24 2001:db8:$i::1/64 ovn-nbctl -- lsp-add sw$i lrp$i-attachment \ @@ -19783,7 +19783,7 @@ done OVN_POPULATE_ARP # allow some time for ovn-northd and ovn-controller to catch up. wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -19812,9 +19812,9 @@ ovn_start # sw1 has a single port bound on hv1 # sw2 has a single port bound on hv2 -ovn-nbctl lr-add ro -ovn-nbctl ls-add sw1 -ovn-nbctl ls-add sw2 +check ovn-nbctl lr-add ro +check ovn-nbctl ls-add sw1 +check ovn-nbctl ls-add sw2 sw1_ro_mac=00:00:10:00:00:01 sw1_ro_ip=10.0.0.1 @@ -19825,17 +19825,17 @@ sw1_p1_ip=10.0.0.2 sw2_p1_mac=00:00:20:00:00:02 sw2_p1_ip=20.0.0.2 -ovn-nbctl lrp-add ro ro-sw1 $sw1_ro_mac ${sw1_ro_ip}/8 -ovn-nbctl lrp-add ro ro-sw2 $sw2_ro_mac ${sw2_ro_ip}/8 -ovn-nbctl lsp-add sw1 sw1-ro -- set Logical_Switch_Port sw1-ro type=router \ +check ovn-nbctl lrp-add ro ro-sw1 $sw1_ro_mac ${sw1_ro_ip}/8 +check ovn-nbctl lrp-add ro ro-sw2 $sw2_ro_mac ${sw2_ro_ip}/8 +check ovn-nbctl lsp-add sw1 sw1-ro -- set Logical_Switch_Port sw1-ro type=router \ options:router-port=ro-sw1 addresses=\"$sw1_ro_mac\" -ovn-nbctl lsp-add sw2 sw2-ro -- set Logical_Switch_Port sw2-ro type=router \ +check ovn-nbctl lsp-add sw2 sw2-ro -- set Logical_Switch_Port sw2-ro type=router \ options:router-port=ro-sw2 addresses=\"$sw2_ro_mac\" -ovn-nbctl lsp-add sw1 sw1-p1 \ +check ovn-nbctl lsp-add sw1 sw1-p1 \ -- lsp-set-addresses sw1-p1 "$sw1_p1_mac $sw1_p1_ip" -ovn-nbctl lsp-add sw2 sw2-p1 \ +check ovn-nbctl lsp-add sw2 sw2-p1 \ -- lsp-set-addresses sw2-p1 "$sw2_p1_mac $sw2_p1_ip" net_add n1 @@ -19904,24 +19904,24 @@ sim_add hv1 sim_add hv2 sim_add hv3 -ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 +check ovn-nbctl --wait=hv set NB_Global . options:"bfd-mult"=15 -ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl ls-add ls1 +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "f0:00:00:00:00:01 10.0.0.4 ae70::4" # Add a couple of external logical port -ovn-nbctl lsp-add ls1 ls1-lp_ext1 \ +check ovn-nbctl lsp-add ls1 ls1-lp_ext1 \ -- lsp-set-addresses ls1-lp_ext1 "f0:00:00:00:00:03 10.0.0.6 ae70::6" -ovn-nbctl lsp-set-port-security ls1-lp_ext1 \ +check ovn-nbctl lsp-set-port-security ls1-lp_ext1 \ "f0:00:00:00:00:03 10.0.0.6 ae70::6" -ovn-nbctl lsp-set-type ls1-lp_ext1 external +check ovn-nbctl lsp-set-type ls1-lp_ext1 external -ovn-nbctl lsp-add ls1 ls1-lp_ext2 \ +check ovn-nbctl lsp-add ls1 ls1-lp_ext2 \ -- lsp-set-addresses ls1-lp_ext2 "f0:00:00:00:00:04 10.0.0.7 ae70::7" -ovn-nbctl lsp-set-port-security ls1-lp_ext2 \ +check ovn-nbctl lsp-set-port-security ls1-lp_ext2 \ "f0:00:00:00:00:04 10.0.0.7 ae70::8" -ovn-nbctl lsp-set-type ls1-lp_ext2 external +check ovn-nbctl lsp-set-type ls1-lp_ext2 external d1="$(ovn-nbctl create DHCP_Options cidr=10.0.0.0/24 \ options="\"server_id\"=\"10.0.0.1\" \"server_mac\"=\"ff:10:00:00:00:01\" \ @@ -19930,25 +19930,25 @@ options="\"server_id\"=\"10.0.0.1\" \"server_mac\"=\"ff:10:00:00:00:01\" \ d2="$(ovn-nbctl create DHCP_Options cidr="ae70\:\:/64" \ options="\"server_id\"=\"00:00:00:10:00:01\"")" -ovn-nbctl lsp-set-dhcpv4-options ls1-lp1 ${d1} -ovn-nbctl lsp-set-dhcpv4-options ls1-lp_ext1 ${d1} -ovn-nbctl lsp-set-dhcpv4-options ls1-lp_ext2 ${d1} +check ovn-nbctl lsp-set-dhcpv4-options ls1-lp1 ${d1} +check ovn-nbctl lsp-set-dhcpv4-options ls1-lp_ext1 ${d1} +check ovn-nbctl lsp-set-dhcpv4-options ls1-lp_ext2 ${d1} -ovn-nbctl lsp-set-dhcpv6-options ls1-lp1 ${d2} -ovn-nbctl lsp-set-dhcpv6-options ls1-lp_ext1 ${d2} -ovn-nbctl lsp-set-dhcpv6-options ls1-lp_ext2 ${d2} +check ovn-nbctl lsp-set-dhcpv6-options ls1-lp1 ${d2} +check ovn-nbctl lsp-set-dhcpv6-options ls1-lp_ext1 ${d2} +check ovn-nbctl lsp-set-dhcpv6-options ls1-lp_ext2 ${d2} # Create a logical router and connect it to ls1 -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-ls1 a0:10:00:00:00:01 10.0.0.1/24 -ovn-nbctl lsp-add ls1 ls1-lr0 -ovn-nbctl set Logical_Switch_Port ls1-lr0 type=router \ +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-ls1 a0:10:00:00:00:01 10.0.0.1/24 +check ovn-nbctl lsp-add ls1 ls1-lr0 +check ovn-nbctl set Logical_Switch_Port ls1-lr0 type=router \ options:router-port=lr0-ls1 addresses=router # Create HA chassis group -ovn-nbctl ha-chassis-group-add hagrp1 -ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv1 30 -ovn-nbctl --wait=sb sync +check ovn-nbctl ha-chassis-group-add hagrp1 +check ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv1 30 +check ovn-nbctl --wait=sb sync hagrp1_uuid=`ovn-nbctl --bare --columns _uuid find ha_chassis_group name="hagrp1"` @@ -20011,7 +20011,7 @@ hv3_uuid=$(fetch_column Chassis _uuid name=hv3) check_row_count Port_Binding 1 logical_port=ls1-lp_ext1 chassis='[[]]' # Associate hagrp1 ha-chassis-group to ls1-lp_ext1 -ovn-nbctl --wait=hv set Logical_Switch_Port ls1-lp_ext1 \ +check ovn-nbctl --wait=hv set Logical_Switch_Port ls1-lp_ext1 \ ha-chassis-group=$hagrp1_uuid # Get the hagrp1 uuid in SB DB. @@ -20042,10 +20042,10 @@ grep controller | grep tp_src=546 | grep \ ]) # Add the localnet port to the logical switch ls1 -ovn-nbctl lsp-add ls1 ln-public -ovn-nbctl lsp-set-addresses ln-public unknown -ovn-nbctl lsp-set-type ln-public localnet -ovn-nbctl --wait=hv lsp-set-options ln-public network_name=phys +check ovn-nbctl lsp-add ls1 ln-public +check ovn-nbctl lsp-set-addresses ln-public unknown +check ovn-nbctl lsp-set-type ln-public localnet +check ovn-nbctl --wait=hv lsp-set-options ln-public network_name=phys ln_public_key=$(fetch_column Port_Binding tunnel_key logical_port=ln-public) @@ -20294,11 +20294,11 @@ as hv1 reset_pcap_file hv1-ext1 hv1/ext1 # Delete the ha-chassis hv1. -ovn-nbctl ha-chassis-group-remove-chassis hagrp1 hv1 +check ovn-nbctl ha-chassis-group-remove-chassis hagrp1 hv1 wait_row_count Port_Binding 1 logical_port=ls1-lp_ext1 chassis='[[]]' # Add hv2 to the ha chassis group -ovn-nbctl --wait=hv ha-chassis-group-add-chassis hagrp1 hv2 20 +check ovn-nbctl --wait=hv ha-chassis-group-add-chassis hagrp1 hv2 20 ovn-sbctl list ha_chassis_group ovn-sbctl list ha_chassis @@ -20404,9 +20404,9 @@ OVN_CHECK_PACKETS_CONTAIN([hv1/ext1-tx.pcap], [expected_out]) OVN_CHECK_PACKETS_CONTAIN([hv2/br-phys_n1-tx.pcap], [expected_out]) # Now add 3 ha chassis to the ha chassis group -ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv1 30 -ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv2 20 -ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv3 10 +check ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv1 30 +check ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv2 20 +check ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv3 10 ovn_wait_for_bfd_up hv1 hv2 hv3 @@ -20479,7 +20479,7 @@ rm -f ext1_v6.packets as hv1 reset_pcap_file hv1-ext1 hv1/ext1 # Now increase the priority of hv3 so it becomes active. -ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv3 50 +check ovn-nbctl ha-chassis-group-add-chassis hagrp1 hv3 50 # hv3 should be active and claim ls1-lp_ext1 wait_row_count Port_Binding 1 logical_port=ls1-lp_ext1 chassis=$hv3_uuid @@ -20597,7 +20597,7 @@ as hv1 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.10 -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 for i in 1 2; do ovn-nbctl lsp-add ls1 lp$i \ -- lsp-set-addresses lp$i "f0:00:00:00:00:0$i 192.168.1.$i" @@ -20682,9 +20682,9 @@ ovn_start # sw1 has a single port bound on hv1 # sw2 has a single port bound on hv2 -ovn-nbctl lr-add ro -ovn-nbctl ls-add sw1 -ovn-nbctl ls-add sw2 +check ovn-nbctl lr-add ro +check ovn-nbctl ls-add sw1 +check ovn-nbctl ls-add sw2 sw1_ro_mac=00:00:10:00:00:01 sw1_ro_ip=10.0.0.1 @@ -20695,17 +20695,17 @@ sw1_p1_ip=10.0.0.2 sw2_p1_mac=00:00:20:00:00:02 sw2_p1_ip=20.0.0.2 -ovn-nbctl lrp-add ro ro-sw1 $sw1_ro_mac ${sw1_ro_ip}/8 -ovn-nbctl lrp-add ro ro-sw2 $sw2_ro_mac ${sw2_ro_ip}/8 -ovn-nbctl lsp-add sw1 sw1-ro -- set Logical_Switch_Port sw1-ro type=router \ +check ovn-nbctl lrp-add ro ro-sw1 $sw1_ro_mac ${sw1_ro_ip}/8 +check ovn-nbctl lrp-add ro ro-sw2 $sw2_ro_mac ${sw2_ro_ip}/8 +check ovn-nbctl lsp-add sw1 sw1-ro -- set Logical_Switch_Port sw1-ro type=router \ options:router-port=ro-sw1 addresses=\"$sw1_ro_mac\" -ovn-nbctl lsp-add sw2 sw2-ro -- set Logical_Switch_Port sw2-ro type=router \ +check ovn-nbctl lsp-add sw2 sw2-ro -- set Logical_Switch_Port sw2-ro type=router \ options:router-port=ro-sw2 addresses=\"$sw2_ro_mac\" -ovn-nbctl lsp-add sw1 sw1-p1 \ +check ovn-nbctl lsp-add sw1 sw1-p1 \ -- lsp-set-addresses sw1-p1 "$sw1_p1_mac $sw1_p1_ip" -ovn-nbctl lsp-add sw2 sw2-p1 \ +check ovn-nbctl lsp-add sw2 sw2-p1 \ -- lsp-set-addresses sw2-p1 "$sw2_p1_mac $sw2_p1_ip" net_add n1 @@ -20772,14 +20772,14 @@ AT_SETUP([ovn-nbctl duplicate addresses]) ovn_start # Set up a switch with some switch ports of varying address types -ovn-nbctl ls-add sw1 -ovn-nbctl set logical_switch sw1 other_config:subnet=192.168.0.0/24 +check ovn-nbctl ls-add sw1 +check ovn-nbctl set logical_switch sw1 other_config:subnet=192.168.0.0/24 -ovn-nbctl lsp-add sw1 sw1-p1 -ovn-nbctl lsp-add sw1 sw1-p2 -ovn-nbctl lsp-add sw1 sw1-p3 -ovn-nbctl lsp-add sw1 sw1-p4 -ovn-nbctl --wait=sb lsp-add sw1 sw1-p5 +check ovn-nbctl lsp-add sw1 sw1-p1 +check ovn-nbctl lsp-add sw1 sw1-p2 +check ovn-nbctl lsp-add sw1 sw1-p3 +check ovn-nbctl lsp-add sw1 sw1-p4 +check ovn-nbctl --wait=sb lsp-add sw1 sw1-p5 check ovn-nbctl --wait=sb lsp-set-addresses sw1-p1 "00:00:00:00:00:01 10.0.0.1 aef0::1" "00:00:00:00:00:02 10.0.0.2 aef0::2" check ovn-nbctl --wait=sb lsp-set-addresses sw1-p2 "00:00:00:00:00:03 dynamic" @@ -20814,8 +20814,8 @@ AT_CHECK([ovn-nbctl lsp-set-addresses sw1-p1 "00:00:00:00:00:01 10.0.0.1 aef0::1 # Now create a new switch and try setting IP addresses the same as the # first switch. This should succeed. -ovn-nbctl ls-add sw2 -ovn-nbctl lsp-add sw2 sw2-p1 +check ovn-nbctl ls-add sw2 +check ovn-nbctl lsp-add sw2 sw2-p1 AT_CHECK([ovn-nbctl lsp-set-addresses sw2-p1 "00:00:00:00:00:04 10.0.0.1"]) AT_CHECK([ovn-nbctl lsp-set-addresses sw2-p1 "00:00:00:00:00:04 192.168.0.2"]) @@ -20831,37 +20831,37 @@ AT_KEYWORDS([check packet length]) AT_KEYWORDS([slowtest]) ovn_start -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-port1 -ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.3 1000::3" -ovn-nbctl lsp-add sw0 sw0-port2 -ovn-nbctl lsp-set-addresses sw0-port2 "50:54:00:00:00:02 10.0.0.4 1000::4" - -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 1000::1/64 -ovn-nbctl lsp-add sw0 sw0-lr0 -ovn-nbctl lsp-set-type sw0-lr0 router -ovn-nbctl lsp-set-addresses sw0-lr0 router -ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 - -ovn-nbctl ls-add public -ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 172.168.0.100/24 2000::1/64 -ovn-nbctl lsp-add public public-lr0 -ovn-nbctl lsp-set-type public-lr0 router -ovn-nbctl lsp-set-addresses public-lr0 router -ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-port1 +check ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.3 1000::3" +check ovn-nbctl lsp-add sw0 sw0-port2 +check ovn-nbctl lsp-set-addresses sw0-port2 "50:54:00:00:00:02 10.0.0.4 1000::4" + +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 1000::1/64 +check ovn-nbctl lsp-add sw0 sw0-lr0 +check ovn-nbctl lsp-set-type sw0-lr0 router +check ovn-nbctl lsp-set-addresses sw0-lr0 router +check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 + +check ovn-nbctl ls-add public +check ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 172.168.0.100/24 2000::1/64 +check ovn-nbctl lsp-add public public-lr0 +check ovn-nbctl lsp-set-type public-lr0 router +check ovn-nbctl lsp-set-addresses public-lr0 router +check ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public # localnet port -ovn-nbctl lsp-add public ln-public -ovn-nbctl lsp-set-type ln-public localnet -ovn-nbctl lsp-set-addresses ln-public unknown -ovn-nbctl lsp-set-options ln-public network_name=phys +check ovn-nbctl lsp-add public ln-public +check ovn-nbctl lsp-set-type ln-public localnet +check ovn-nbctl lsp-set-addresses ln-public unknown +check ovn-nbctl lsp-set-options ln-public network_name=phys -ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 20 -ovn-nbctl lr-nat-add lr0 snat 172.168.0.100 10.0.0.0/24 -ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.168.0.110 10.0.0.4 sw0-port2 f0:00:00:01:02:04 -ovn-nbctl lr-nat-add lr0 snat 2000::1 1000::/64 -ovn-nbctl lr-nat-add lr0 dnat_and_snat 2000::2 1000::4 sw0-port2 f0:00:00:01:02:04 +check ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 20 +check ovn-nbctl lr-nat-add lr0 snat 172.168.0.100 10.0.0.0/24 +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.168.0.110 10.0.0.4 sw0-port2 f0:00:00:01:02:04 +check ovn-nbctl lr-nat-add lr0 snat 2000::1 1000::/64 +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 2000::2 1000::4 sw0-port2 f0:00:00:01:02:04 net_add n1 @@ -21120,7 +21120,7 @@ test_ip6_packet_larger_ext() { } wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync ovn-nbctl show > nbdump AT_CAPTURE_FILE([nbdump]) @@ -21184,26 +21184,26 @@ test_ip6_packet_larger_ext 1 000020201213 20000000000000000000000000000001 100 c AS_BOX([testing ingress traffic mtu 100 - IPv6 FIP]) test_ip6_packet_larger_ext 2 f00000010204 20000000000000000000000000000002 100 cc79 -ovn-nbctl lsp-del sw0-lr0 +check ovn-nbctl lsp-del sw0-lr0 -ovn-nbctl lr-del lr0 +check ovn-nbctl lr-del lr0 ovn-nbctl create Logical_Router name=lr1 options:chassis="hv1" -ovn-nbctl lrp-add lr1 lr1-sw0 00:00:00:00:ff:01 10.0.0.1/24 1000::1/64 -ovn-nbctl lsp-add sw0 sw0-lr1 -ovn-nbctl lsp-set-type sw0-lr1 router -ovn-nbctl lsp-set-addresses sw0-lr1 router -ovn-nbctl lsp-set-options sw0-lr1 router-port=lr1-sw0 - -ovn-nbctl lrp-add lr1 lr1-public 00:00:20:20:12:13 172.168.0.100/24 2000::1/64 -ovn-nbctl lsp-del public-lr0 -ovn-nbctl lsp-add public public-lr1 -ovn-nbctl lsp-set-type public-lr1 router -ovn-nbctl lsp-set-addresses public-lr1 router -ovn-nbctl lsp-set-options public-lr1 router-port=lr1-public - -ovn-nbctl lr-nat-add lr1 snat 172.168.0.100 10.0.0.0/24 -ovn-nbctl lr-nat-add lr1 snat 2000::1 1000::/64 -ovn-nbctl --wait=sb sync +check ovn-nbctl lrp-add lr1 lr1-sw0 00:00:00:00:ff:01 10.0.0.1/24 1000::1/64 +check ovn-nbctl lsp-add sw0 sw0-lr1 +check ovn-nbctl lsp-set-type sw0-lr1 router +check ovn-nbctl lsp-set-addresses sw0-lr1 router +check ovn-nbctl lsp-set-options sw0-lr1 router-port=lr1-sw0 + +check ovn-nbctl lrp-add lr1 lr1-public 00:00:20:20:12:13 172.168.0.100/24 2000::1/64 +check ovn-nbctl lsp-del public-lr0 +check ovn-nbctl lsp-add public public-lr1 +check ovn-nbctl lsp-set-type public-lr1 router +check ovn-nbctl lsp-set-addresses public-lr1 router +check ovn-nbctl lsp-set-options public-lr1 router-port=lr1-public + +check ovn-nbctl lr-nat-add lr1 snat 172.168.0.100 10.0.0.0/24 +check ovn-nbctl lr-nat-add lr1 snat 2000::1 1000::/64 +check ovn-nbctl --wait=sb sync dp_uuid=$(ovn-sbctl find datapath_binding | grep sw0 -B2 | grep _uuid | \ awk '{print $3}') @@ -21343,37 +21343,37 @@ ovs-vsctl -- add-port br-int hv2-vif2 -- \ ofport-request=3 ovn-nbctl create Logical_Router name=lr0 -ovn-nbctl ls-add sw0 -ovn-nbctl ls-add sw1 +check ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw1 -ovn-nbctl lrp-add lr0 sw0 00:00:01:01:02:03 192.168.1.1/24 2001:0:0:0:0:0:0:1/64 -ovn-nbctl lsp-add sw0 rp-sw0 -- set Logical_Switch_Port rp-sw0 \ +check ovn-nbctl lrp-add lr0 sw0 00:00:01:01:02:03 192.168.1.1/24 2001:0:0:0:0:0:0:1/64 +check ovn-nbctl lsp-add sw0 rp-sw0 -- set Logical_Switch_Port rp-sw0 \ type=router options:router-port=sw0 \ -- lsp-set-addresses rp-sw0 router -ovn-nbctl lrp-add lr0 lr0-sw1 00:00:02:01:02:03 172.16.1.1/24 2002:0:0:0:0:0:0:1/64 \ +check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:02:01:02:03 172.16.1.1/24 2002:0:0:0:0:0:0:1/64 \ -- lrp-set-gateway-chassis lr0-sw1 hv2 -ovn-nbctl lsp-add sw1 rp-sw1 -- set Logical_Switch_Port rp-sw1 \ +check ovn-nbctl lsp-add sw1 rp-sw1 -- set Logical_Switch_Port rp-sw1 \ type=router options:router-port=lr0-sw1 \ -- lsp-set-addresses rp-sw1 router -ovn-nbctl lsp-add sw0 sw0-p0 \ +check ovn-nbctl lsp-add sw0 sw0-p0 \ -- lsp-set-addresses sw0-p0 "f0:00:00:01:02:03 192.168.1.2 2001::2" -ovn-nbctl lsp-add sw0 sw0-p1 \ +check ovn-nbctl lsp-add sw0 sw0-p1 \ -- lsp-set-addresses sw0-p1 "f0:00:00:11:02:03 192.168.1.3 2001::3" -ovn-nbctl lsp-add sw1 sw1-p0 \ +check ovn-nbctl lsp-add sw1 sw1-p0 \ -- lsp-set-addresses sw1-p0 unknown check ovn-nbctl lsp-add sw1 ln-sw1 -- lsp-set-type ln-sw1 localnet -ovn-nbctl lr-nat-add lr0 snat 172.16.1.1 192.168.1.0/24 -ovn-nbctl lr-nat-add lr0 snat 2002::1 2001::/64 +check ovn-nbctl lr-nat-add lr0 snat 172.16.1.1 192.168.1.0/24 +check ovn-nbctl lr-nat-add lr0 snat 2002::1 2001::/64 OVN_POPULATE_ARP wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -21414,10 +21414,10 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) # Create FIP on sw0-p0, add a route on logical router pipeline and # ARP request for a unkwon destination is sent using FIP MAC/IP -ovn-nbctl lr-nat-del lr0 snat -ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.1.2 192.168.1.3 sw0-p1 f0:00:00:01:02:04 -ovn-nbctl lr-route-add lr0 172.16.2.0/24 172.16.1.11 -ovn-nbctl --wait=hv sync +check ovn-nbctl lr-nat-del lr0 snat +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.1.2 192.168.1.3 sw0-p1 f0:00:00:01:02:04 +check ovn-nbctl lr-route-add lr0 172.16.2.0/24 172.16.1.11 +check ovn-nbctl --wait=hv sync ovn-sbctl dump-flows > sbflows2 AT_CAPTURE_FILE([sbflows2]) @@ -21586,16 +21586,16 @@ AT_SETUP([ipam to non-ipam]) ovn_start check ovn-nbctl --wait=sb sync -ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic +check ovn-nbctl --wait=hv set NB_Global . options:mac_prefix="0a:00:00:00:00:00" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 p0 -- lsp-set-addresses p0 dynamic ovn-nbctl --wait=sb add Logical-Switch sw0 other_config subnet=192.168.1.0/24 AT_CHECK([ovn-nbctl get Logical-Switch-Port p0 dynamic_addresses], [0], ["0a:00:00:a8:01:03 192.168.1.2" ]) -ovn-nbctl --wait=sb lsp-set-addresses p0 router +check ovn-nbctl --wait=sb lsp-set-addresses p0 router ovn-nbctl get Logical-Switch-Port p0 dynamic_addresses @@ -21608,8 +21608,8 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([ipam router ports]) ovn_start -ovn-nbctl ls-add sw -ovn-nbctl set logical_switch sw other-config:subnet=192.168.1.0/24 +check ovn-nbctl ls-add sw +check ovn-nbctl set logical_switch sw other-config:subnet=192.168.1.0/24 for i in 2 3 4; do ovn-nbctl lr-add ro$i @@ -21915,15 +21915,15 @@ for i in 1 2; do done -ovn-nbctl lr-add router -ovn-nbctl lrp-add router router-to-ls1 00:00:01:01:02:03 192.168.1.3/24 -ovn-nbctl lrp-add router router-to-ls2 00:00:01:01:02:05 192.168.2.3/24 +check ovn-nbctl lr-add router +check ovn-nbctl lrp-add router router-to-ls1 00:00:01:01:02:03 192.168.1.3/24 +check ovn-nbctl lrp-add router router-to-ls2 00:00:01:01:02:05 192.168.2.3/24 -ovn-nbctl lsp-add ls1 ls1-to-router -- set Logical_Switch_Port ls1-to-router type=router options:router-port=router-to-ls1 -- lsp-set-addresses ls1-to-router router -ovn-nbctl lsp-add ls2 ls2-to-router -- set Logical_Switch_Port ls2-to-router type=router options:router-port=router-to-ls2 -- lsp-set-addresses ls2-to-router router +check ovn-nbctl lsp-add ls1 ls1-to-router -- set Logical_Switch_Port ls1-to-router type=router options:router-port=router-to-ls1 -- lsp-set-addresses ls1-to-router router +check ovn-nbctl lsp-add ls2 ls2-to-router -- set Logical_Switch_Port ls2-to-router type=router options:router-port=router-to-ls2 -- lsp-set-addresses ls2-to-router router wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync #ovn-sbctl dump-flows for i in 1 2; do for j in 1 2; do @@ -22073,7 +22073,7 @@ ovs-vsctl -- add-port br-int hv2-vif2 -- \ options:rxq_pcap=hv2/vif2-rx.pcap \ ofport-request=2 -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 check ovn-nbctl lsp-add sw0 sw0-vir check ovn-nbctl lsp-set-addresses sw0-vir "50:54:00:00:00:10 10.0.0.10" @@ -22148,7 +22148,7 @@ check ovn-nbctl lr-nat-add lr0 dnat_and_snat 2001:db8::61d1 1000::61d1 sw0-vir6 OVN_POPULATE_ARP wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Get the OF table numbers acl_eval=$(ovn-debug lflow-stage-to-oftable ls_out_acl_eval) @@ -22492,7 +22492,7 @@ check_virtual_offlows_present hv2 check_virtual_offlows_not_present hv1 # Delete sw0-p2 logical port -ovn-nbctl lsp-del sw0-p2 +check ovn-nbctl lsp-del sw0-p2 OVS_WAIT_UNTIL([test x$(ovn-sbctl --bare --columns chassis find port_binding \ logical_port=sw0-vir) = x]) @@ -22502,15 +22502,15 @@ logical_port=sw0-vir) = x]) wait_row_count nb:Logical_Switch_Port 1 up=false name=sw0-vir # Clear virtual_ip column of sw0-vir. There should be no bind_vport flows. -ovn-nbctl --wait=hv remove logical_switch_port sw0-vir options virtual-ip -ovn-nbctl --wait=hv remove logical_switch_port sw0-vir6 options virtual-ip +check ovn-nbctl --wait=hv remove logical_switch_port sw0-vir options virtual-ip +check ovn-nbctl --wait=hv remove logical_switch_port sw0-vir6 options virtual-ip ovn-sbctl dump-flows sw0 > sw0-flows2 AT_CAPTURE_FILE([sw0-flows2]) AT_CHECK([grep ls_in_arp_rsp sw0-flows2 | grep bind_vport], [1]) # Add back virtual_ip and clear virtual_parents. -ovn-nbctl --wait=hv set logical_switch_port sw0-vir options:virtual-ip=10.0.0.10 +check ovn-nbctl --wait=hv set logical_switch_port sw0-vir options:virtual-ip=10.0.0.10 check ovn-nbctl --wait=hv sync ovn-sbctl dump-flows sw0 > sw0-flows3 @@ -22527,7 +22527,7 @@ check_virtual_offlows_not_present hv2 # hv1 should not have the above flows. check_virtual_offlows_not_present hv2 -ovn-nbctl --wait=hv remove logical_switch_port sw0-vir options virtual-parents +check ovn-nbctl --wait=hv remove logical_switch_port sw0-vir options virtual-parents ovn-sbctl dump-flows sw0 > sw0-flows4 AT_CAPTURE_FILE([sw0-flows4]) AT_CHECK([grep ls_in_arp_rsp sw0-flows4 | grep bind_vport], [1]) @@ -22536,16 +22536,16 @@ ovn-sbctl dump-flows lr0 > lr0-flows8 AT_CAPTURE_FILE([lr0-flows8]) # Delete sw0-vir and add again. -ovn-nbctl lsp-del sw0-vir +check ovn-nbctl lsp-del sw0-vir -ovn-nbctl lsp-add sw0 sw0-vir -ovn-nbctl lsp-set-addresses sw0-vir "50:54:00:00:00:10 10.0.0.10" -ovn-nbctl lsp-set-port-security sw0-vir "50:54:00:00:00:10 10.0.0.10" -ovn-nbctl lsp-set-type sw0-vir virtual -ovn-nbctl set logical_switch_port sw0-vir options:virtual-ip=10.0.0.10 -ovn-nbctl set logical_switch_port sw0-vir options:virtual-parents=sw0-p1,sw0-p2,sw0-p3 +check ovn-nbctl lsp-add sw0 sw0-vir +check ovn-nbctl lsp-set-addresses sw0-vir "50:54:00:00:00:10 10.0.0.10" +check ovn-nbctl lsp-set-port-security sw0-vir "50:54:00:00:00:10 10.0.0.10" +check ovn-nbctl lsp-set-type sw0-vir virtual +check ovn-nbctl set logical_switch_port sw0-vir options:virtual-ip=10.0.0.10 +check ovn-nbctl set logical_switch_port sw0-vir options:virtual-parents=sw0-p1,sw0-p2,sw0-p3 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Check that logical flows are added for sw0-vir in lsp_in_arp_rsp pipeline # with bind_vport action. @@ -22633,7 +22633,7 @@ for i in 1 2; do done as hv1 -ovn-nbctl lsp-add sw1 sw1-p0 \ +check ovn-nbctl lsp-add sw1 sw1-p0 \ -- lsp-set-addresses sw1-p0 "00:00:00:00:00:33 192.168.2.11 2002::1" ovs-vsctl -- add-port br-int vif33 -- \ set interface vif33 \ @@ -22642,21 +22642,21 @@ ovs-vsctl -- add-port br-int vif33 -- \ options:rxq_pcap=hv$i/vif33-rx.pcap \ ofport-request=33 -ovn-nbctl --event lb-add lb0 192.168.1.100:80 "" -ovn-nbctl ls-lb-add sw0 lb0 +check ovn-nbctl --event lb-add lb0 192.168.1.100:80 "" +check ovn-nbctl ls-lb-add sw0 lb0 uuid_lb0=$(ovn-nbctl --bare --columns=_uuid find load_balancer name=lb0) -ovn-nbctl --event lb-add lb1 192.168.2.100:80 "" -ovn-nbctl lr-lb-add lr0 lb1 +check ovn-nbctl --event lb-add lb1 192.168.2.100:80 "" +check ovn-nbctl lr-lb-add lr0 lb1 uuid_lb1=$(ovn-nbctl --bare --columns=_uuid find load_balancer name=lb1) -ovn-nbctl --event lb-add lb2 [[2001::10]]:50051 "" -ovn-nbctl ls-lb-add sw0 lb2 +check ovn-nbctl --event lb-add lb2 [[2001::10]]:50051 "" +check ovn-nbctl ls-lb-add sw0 lb2 uuid_lb2=$(ovn-nbctl --bare --columns=_uuid find load_balancer name=lb2) -ovn-nbctl --wait=hv meter-add event-elb drop 100 pktps 10 -ovn-nbctl --wait=hv copp-add copp0 event-elb event-elb -ovn-nbctl --wait=hv ls-copp-add copp0 sw0 +check ovn-nbctl --wait=hv meter-add event-elb drop 100 pktps 10 +check ovn-nbctl --wait=hv copp-add copp0 event-elb event-elb +check ovn-nbctl --wait=hv ls-copp-add copp0 sw0 OVN_POPULATE_ARP wait_for_ports_up @@ -22759,28 +22759,28 @@ ovn_start # - 1 port bound on hv2 (sw3-p2) # - 1 localnet port (sw3-ln) -ovn-nbctl ls-add sw1 -ovn-nbctl ls-add sw2 -ovn-nbctl ls-add sw3 - -ovn-nbctl lsp-add sw1 sw1-p11 -ovn-nbctl lsp-add sw1 sw1-p12 -ovn-nbctl lsp-add sw1 sw1-p21 -ovn-nbctl lsp-add sw1 sw1-p22 -ovn-nbctl lsp-add sw2 sw2-p1 -ovn-nbctl lsp-add sw2 sw2-p2 -ovn-nbctl lsp-add sw3 sw3-p1 -ovn-nbctl lsp-add sw3 sw3-p2 -ovn-nbctl lsp-add sw3 sw3-ln \ +check ovn-nbctl ls-add sw1 +check ovn-nbctl ls-add sw2 +check ovn-nbctl ls-add sw3 + +check ovn-nbctl lsp-add sw1 sw1-p11 +check ovn-nbctl lsp-add sw1 sw1-p12 +check ovn-nbctl lsp-add sw1 sw1-p21 +check ovn-nbctl lsp-add sw1 sw1-p22 +check ovn-nbctl lsp-add sw2 sw2-p1 +check ovn-nbctl lsp-add sw2 sw2-p2 +check ovn-nbctl lsp-add sw3 sw3-p1 +check ovn-nbctl lsp-add sw3 sw3-p2 +check ovn-nbctl lsp-add sw3 sw3-ln \ -- lsp-set-type sw3-ln localnet \ -- lsp-set-options sw3-ln network_name=phys -ovn-nbctl lr-add rtr -ovn-nbctl lrp-add rtr rtr-sw1 00:00:00:00:01:00 10.0.0.254/24 -ovn-nbctl lrp-add rtr rtr-sw2 00:00:00:00:02:00 20.0.0.254/24 -ovn-nbctl lrp-add rtr rtr-sw3 00:00:00:00:03:00 30.0.0.254/24 +check ovn-nbctl lr-add rtr +check ovn-nbctl lrp-add rtr rtr-sw1 00:00:00:00:01:00 10.0.0.254/24 +check ovn-nbctl lrp-add rtr rtr-sw2 00:00:00:00:02:00 20.0.0.254/24 +check ovn-nbctl lrp-add rtr rtr-sw3 00:00:00:00:03:00 30.0.0.254/24 -ovn-nbctl lsp-add sw1 sw1-rtr \ +check ovn-nbctl lsp-add sw1 sw1-rtr \ -- lsp-set-type sw1-rtr router \ -- lsp-set-addresses sw1-rtr 00:00:00:00:01:00 \ -- lsp-set-options sw1-rtr router-port=rtr-sw1 @@ -23235,16 +23235,16 @@ as hv2 reset_pcap_file hv2-vif4 hv2/vif4 > expected_reports # Enable mcast_flood on sw1-p11 -ovn-nbctl set Logical_Switch_Port sw1-p11 options:mcast_flood='true' +check ovn-nbctl set Logical_Switch_Port sw1-p11 options:mcast_flood='true' # Enable mcast_flood_reports on sw1-p21 -ovn-nbctl set Logical_Switch_Port sw1-p21 options:mcast_flood_reports='true' +check ovn-nbctl set Logical_Switch_Port sw1-p21 options:mcast_flood_reports='true' # Enable mcast_flood on rtr-sw2 -ovn-nbctl set Logical_Router_Port rtr-sw2 options:mcast_flood='true' +check ovn-nbctl set Logical_Router_Port rtr-sw2 options:mcast_flood='true' # Enable mcast_flood on sw2-p1 -ovn-nbctl set Logical_Switch_Port sw2-p1 options:mcast_flood='true' +check ovn-nbctl set Logical_Switch_Port sw2-p1 options:mcast_flood='true' -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Inject IGMP Join for 239.0.1.68 on sw1-p12. send_igmp_v3_report hv1-vif2 hv1 \ @@ -23313,7 +23313,7 @@ dp=$(fetch_column Datapath_Binding _uuid external_ids:name=sw2) ch=$(fetch_column Chassis _uuid name=hv3) ovn-sbctl create IGMP_Group address=239.0.1.42 datapath=$dp chassis=$ch chassis_name=hv3 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync wait_row_count IGMP_Group 2 address=239.0.1.68 wait_row_count IGMP_Group 1 address=239.0.1.42 @@ -23347,7 +23347,7 @@ check ovn-nbctl lr-add rtr \ -- lrp-add rtr rtr-sw1 00:00:00:00:01:00 10.0.0.254/24 \ -- lrp-add rtr rtr-sw2 00:00:00:00:02:00 20.0.0.254/24 -ovn-nbctl lsp-add sw1 sw1-rtr \ +check ovn-nbctl lsp-add sw1 sw1-rtr \ -- lsp-set-type sw1-rtr router \ -- lsp-set-addresses sw1-rtr 00:00:00:00:01:00 \ -- lsp-set-options sw1-rtr router-port=rtr-sw1 @@ -24439,7 +24439,7 @@ m4_define([DVR_N_S_ARP_HANDLING], # Set a hypervisor as gateway chassis, for router port 172.31.0.1 ovn-nbctl lrp-set-gateway-chassis router-to-underlay hv3 wait_for_ports_up - ovn-nbctl --wait=sb sync + check ovn-nbctl --wait=sb sync OVN_WAIT_PATCH_PORT_FLOWS(["ln1"] ["ln2"], ["hv1"] ["hv2"] ["hv3"]) OVN_WAIT_PATCH_PORT_FLOWS(["ln4"], ["hv4"]) @@ -24669,7 +24669,7 @@ m4_define([DVR_N_S_PING], ovn-nbctl lrp-set-redirect-type router-to-underlay bridged wait_for_ports_up - ovn-nbctl --wait=sb sync + check ovn-nbctl --wait=sb sync OVN_WAIT_PATCH_PORT_FLOWS(["ln1"] ["ln2"], ["hv1"] ["hv2"] ["hv3"]) OVN_WAIT_PATCH_PORT_FLOWS(["ln4"], ["hv4"]) @@ -24881,34 +24881,34 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \ options:rxq_pcap=hv2/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03" +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03" # Create the second logical switch with one port -ovn-nbctl ls-add sw1 -ovn-nbctl lsp-add sw1 sw1-p1 -ovn-nbctl lsp-set-addresses sw1-p1 "40:54:00:00:00:03 20.0.0.3" -ovn-nbctl lsp-set-port-security sw1-p1 "40:54:00:00:00:03 20.0.0.3" +check ovn-nbctl ls-add sw1 +check ovn-nbctl lsp-add sw1 sw1-p1 +check ovn-nbctl lsp-set-addresses sw1-p1 "40:54:00:00:00:03 20.0.0.3" +check ovn-nbctl lsp-set-port-security sw1-p1 "40:54:00:00:00:03 20.0.0.3" # Create a logical router and attach both logical switches -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 -ovn-nbctl lsp-add sw0 sw0-lr0 -ovn-nbctl lsp-set-type sw0-lr0 router -ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:ff:01 -ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 - -ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 -ovn-nbctl lsp-add sw1 sw1-lr0 -ovn-nbctl lsp-set-type sw1-lr0 router -ovn-nbctl lsp-set-addresses sw1-lr0 00:00:00:00:ff:02 -ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 +check ovn-nbctl lsp-add sw0 sw0-lr0 +check ovn-nbctl lsp-set-type sw0-lr0 router +check ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:ff:01 +check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 + +check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 +check ovn-nbctl lsp-add sw1 sw1-lr0 +check ovn-nbctl lsp-set-type sw1-lr0 router +check ovn-nbctl lsp-set-addresses sw1-lr0 00:00:00:00:ff:02 +check ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 OVN_POPULATE_ARP wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Get the OF table numbers learn_neigh=$(ovn-debug lflow-stage-to-oftable lr_in_learn_neighbor) @@ -25080,11 +25080,11 @@ ovn_start # Logical switch will have a localnet port also. # This VIF will be assigned a MAC address only (i.e. no ip). -ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 ln1 "" 101 -ovn-nbctl lsp-set-addresses ln1 unknown -ovn-nbctl lsp-set-type ln1 localnet -ovn-nbctl lsp-set-options ln1 network_name=phys +check ovn-nbctl ls-add ls1 +check ovn-nbctl lsp-add ls1 ln1 "" 101 +check ovn-nbctl lsp-set-addresses ln1 unknown +check ovn-nbctl lsp-set-type ln1 localnet +check ovn-nbctl lsp-set-options ln1 network_name=phys net_add n1 @@ -25102,12 +25102,12 @@ ovs-vsctl add-port br-int vif11 -- \ lsp_name=lp11 -ovn-nbctl lsp-add ls1 lp11 -ovn-nbctl lsp-set-addresses lp11 "f0:00:00:00:00:11" -ovn-nbctl lsp-set-port-security lp11 f0:00:00:00:00:11 +check ovn-nbctl lsp-add ls1 lp11 +check ovn-nbctl lsp-set-addresses lp11 "f0:00:00:00:00:11" +check ovn-nbctl lsp-set-port-security lp11 f0:00:00:00:00:11 wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-nbctl show ovn-sbctl show @@ -25147,25 +25147,25 @@ ovn_start # option disable_garp_rarp, which when set to true for an lsp does # not send the GARP/RARP announcements. -ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 ln1 "" 101 -ovn-nbctl lsp-set-addresses ln1 unknown -ovn-nbctl lsp-set-type ln1 localnet -ovn-nbctl lsp-set-options ln1 network_name=phys +check ovn-nbctl ls-add ls1 +check ovn-nbctl lsp-add ls1 ln1 "" 101 +check ovn-nbctl lsp-set-addresses ln1 unknown +check ovn-nbctl lsp-set-type ln1 localnet +check ovn-nbctl lsp-set-options ln1 network_name=phys -ovn-nbctl lsp-add ls1 lp11 -ovn-nbctl lsp-set-addresses lp11 "f0:00:00:00:00:11" +check ovn-nbctl lsp-add ls1 lp11 +check ovn-nbctl lsp-set-addresses lp11 "f0:00:00:00:00:11" -ovn-nbctl lsp-add ls1 lp12 -ovn-nbctl lsp-set-addresses lp12 "f0:00:00:00:00:12" -ovn-nbctl set logical_switch_port lp12 options:disable_garp_rarp=true +check ovn-nbctl lsp-add ls1 lp12 +check ovn-nbctl lsp-set-addresses lp12 "f0:00:00:00:00:12" +check ovn-nbctl set logical_switch_port lp12 options:disable_garp_rarp=true -ovn-nbctl lsp-add ls1 lp13 -ovn-nbctl lsp-set-addresses lp13 "f0:00:00:00:00:13 192.168.1.3" +check ovn-nbctl lsp-add ls1 lp13 +check ovn-nbctl lsp-set-addresses lp13 "f0:00:00:00:00:13 192.168.1.3" -ovn-nbctl lsp-add ls1 lp14 -ovn-nbctl lsp-set-addresses lp14 "f0:00:00:00:00:14 192.168.1.4" -ovn-nbctl set logical_switch_port lp14 options:disable_garp_rarp=true +check ovn-nbctl lsp-add ls1 lp14 +check ovn-nbctl lsp-set-addresses lp14 "f0:00:00:00:00:14 192.168.1.4" +check ovn-nbctl set logical_switch_port lp14 options:disable_garp_rarp=true net_add n1 @@ -25190,7 +25190,7 @@ ovs-vsctl add-port br-int vif14 -- \ set Interface vif14 external-ids:iface-id=lp14 wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync # RARP packet for lp11 echo "fffffffffffff000000000118100006580350001080006040003f0000000001100000000f0000000001100000000" > expected @@ -25290,22 +25290,22 @@ for i in 1 2; do done -ovn-nbctl ls-add ls-underlay -ovn-nbctl lsp-add ls-underlay ln3 "" 1000 -ovn-nbctl lsp-set-addresses ln3 unknown -ovn-nbctl lsp-set-type ln3 localnet -ovn-nbctl lsp-set-options ln3 network_name=phys +check ovn-nbctl ls-add ls-underlay +check ovn-nbctl lsp-add ls-underlay ln3 "" 1000 +check ovn-nbctl lsp-set-addresses ln3 unknown +check ovn-nbctl lsp-set-type ln3 localnet +check ovn-nbctl lsp-set-options ln3 network_name=phys -ovn-nbctl ls-add ls-north -ovn-nbctl lsp-add ls-north ln4 "" 1000 -ovn-nbctl lsp-set-addresses ln4 unknown -ovn-nbctl lsp-set-type ln4 localnet -ovn-nbctl lsp-set-options ln4 network_name=phys +check ovn-nbctl ls-add ls-north +check ovn-nbctl lsp-add ls-north ln4 "" 1000 +check ovn-nbctl lsp-set-addresses ln4 unknown +check ovn-nbctl lsp-set-type ln4 localnet +check ovn-nbctl lsp-set-options ln4 network_name=phys # Add a VM on ls-north -ovn-nbctl lsp-add ls-north lp-north -ovn-nbctl lsp-set-addresses lp-north "f0:f0:00:00:00:11 172.31.0.10" -ovn-nbctl lsp-set-port-security lp-north f0:f0:00:00:00:11 +check ovn-nbctl lsp-add ls-north lp-north +check ovn-nbctl lsp-set-addresses lp-north "f0:f0:00:00:00:11 172.31.0.10" +check ovn-nbctl lsp-set-port-security lp-north f0:f0:00:00:00:11 # Add 3rd hypervisor sim_add hv3 @@ -25327,26 +25327,26 @@ as hv4 ovs-vsctl add-port br-int vif-north -- \ options:rxq_pcap=hv4/vif-north-rx.pcap \ ofport-request=44 -ovn-nbctl lr-add router -ovn-nbctl lrp-add router router-to-ls1 00:00:01:01:02:03 192.168.1.3/24 -ovn-nbctl lrp-add router router-to-ls2 00:00:01:01:02:05 192.168.2.3/24 -ovn-nbctl lrp-add router router-to-underlay 00:00:01:01:02:07 172.31.0.1/24 +check ovn-nbctl lr-add router +check ovn-nbctl lrp-add router router-to-ls1 00:00:01:01:02:03 192.168.1.3/24 +check ovn-nbctl lrp-add router router-to-ls2 00:00:01:01:02:05 192.168.2.3/24 +check ovn-nbctl lrp-add router router-to-underlay 00:00:01:01:02:07 172.31.0.1/24 -ovn-nbctl lsp-add ls1 ls1-to-router -- set Logical_Switch_Port ls1-to-router type=router \ +check ovn-nbctl lsp-add ls1 ls1-to-router -- set Logical_Switch_Port ls1-to-router type=router \ options:router-port=router-to-ls1 -- lsp-set-addresses ls1-to-router router -ovn-nbctl lsp-add ls2 ls2-to-router -- set Logical_Switch_Port ls2-to-router type=router \ +check ovn-nbctl lsp-add ls2 ls2-to-router -- set Logical_Switch_Port ls2-to-router type=router \ options:router-port=router-to-ls2 -- lsp-set-addresses ls2-to-router router -ovn-nbctl lsp-add ls-underlay underlay-to-router -- set Logical_Switch_Port \ +check ovn-nbctl lsp-add ls-underlay underlay-to-router -- set Logical_Switch_Port \ underlay-to-router type=router \ options:router-port=router-to-underlay \ -- lsp-set-addresses underlay-to-router router -ovn-nbctl lrp-set-gateway-chassis router-to-underlay hv3 -ovn-nbctl --stateless lr-nat-add router dnat_and_snat 172.31.0.100 192.168.1.1 -ovn-nbctl lrp-set-redirect-type router-to-underlay bridged +check ovn-nbctl lrp-set-gateway-chassis router-to-underlay hv3 +check ovn-nbctl --stateless lr-nat-add router dnat_and_snat 172.31.0.100 192.168.1.1 +check ovn-nbctl lrp-set-redirect-type router-to-underlay bridged wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync OVN_WAIT_PATCH_PORT_FLOWS(["ln1"] ["ln2"] ["ln3"], ["hv1"] ["hv2"] ["hv3"]) OVN_WAIT_PATCH_PORT_FLOWS(["ln4"], ["hv4"]) @@ -25953,68 +25953,68 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \ options:rxq_pcap=hv2/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-add sw0 sw0-p2 -ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" -ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-add sw0 sw0-p2 +check ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" # Create the second logical switch with one port -ovn-nbctl ls-add sw1 -ovn-nbctl lsp-add sw1 sw1-p1 -ovn-nbctl lsp-set-addresses sw1-p1 "40:54:00:00:00:03 20.0.0.3" -ovn-nbctl lsp-set-port-security sw1-p1 "40:54:00:00:00:03 20.0.0.3" +check ovn-nbctl ls-add sw1 +check ovn-nbctl lsp-add sw1 sw1-p1 +check ovn-nbctl lsp-set-addresses sw1-p1 "40:54:00:00:00:03 20.0.0.3" +check ovn-nbctl lsp-set-port-security sw1-p1 "40:54:00:00:00:03 20.0.0.3" # Create a logical router and attach both logical switches -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 -ovn-nbctl lsp-add sw0 sw0-lr0 -ovn-nbctl lsp-set-type sw0-lr0 router -ovn-nbctl lsp-set-addresses sw0-lr0 router -ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 +check ovn-nbctl lsp-add sw0 sw0-lr0 +check ovn-nbctl lsp-set-type sw0-lr0 router +check ovn-nbctl lsp-set-addresses sw0-lr0 router +check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 -ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 -ovn-nbctl lsp-add sw1 sw1-lr0 -ovn-nbctl lsp-set-type sw1-lr0 router -ovn-nbctl lsp-set-addresses sw1-lr0 router -ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 +check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 +check ovn-nbctl lsp-add sw1 sw1-lr0 +check ovn-nbctl lsp-set-type sw1-lr0 router +check ovn-nbctl lsp-set-addresses sw1-lr0 router +check ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 -ovn-nbctl lb-add lb1 10.0.0.10:80 10.0.0.3:80,20.0.0.3:80 sctp +check ovn-nbctl lb-add lb1 10.0.0.10:80 10.0.0.3:80,20.0.0.3:80 sctp -ovn-nbctl --wait=sb set load_balancer . ip_port_mappings:10.0.0.3=sw0-p1:10.0.0.2 -ovn-nbctl --wait=sb set load_balancer . ip_port_mappings:20.0.0.3=sw1-p1:10.0.0.2 +check ovn-nbctl --wait=sb set load_balancer . ip_port_mappings:10.0.0.3=sw0-p1:10.0.0.2 +check ovn-nbctl --wait=sb set load_balancer . ip_port_mappings:20.0.0.3=sw1-p1:10.0.0.2 ovn-nbctl --wait=sb -- --id=@hc create \ Load_Balancer_Health_Check vip="10.0.0.10\:80" -- add Load_Balancer . \ health_check @hc -ovn-nbctl --wait=sb ls-lb-add sw0 lb1 -ovn-nbctl --wait=sb ls-lb-add sw1 lb1 -ovn-nbctl --wait=sb lr-lb-add lr0 lb1 +check ovn-nbctl --wait=sb ls-lb-add sw0 lb1 +check ovn-nbctl --wait=sb ls-lb-add sw1 lb1 +check ovn-nbctl --wait=sb lr-lb-add lr0 lb1 -ovn-nbctl ls-add public -ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 172.168.0.100/24 -ovn-nbctl lsp-add public public-lr0 -ovn-nbctl lsp-set-type public-lr0 router -ovn-nbctl lsp-set-addresses public-lr0 router -ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public +check ovn-nbctl ls-add public +check ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 172.168.0.100/24 +check ovn-nbctl lsp-add public public-lr0 +check ovn-nbctl lsp-set-type public-lr0 router +check ovn-nbctl lsp-set-addresses public-lr0 router +check ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public # localnet port -ovn-nbctl lsp-add public ln-public -ovn-nbctl lsp-set-type ln-public localnet -ovn-nbctl lsp-set-addresses ln-public unknown -ovn-nbctl lsp-set-options ln-public network_name=public +check ovn-nbctl lsp-add public ln-public +check ovn-nbctl lsp-set-type ln-public localnet +check ovn-nbctl lsp-set-addresses ln-public unknown +check ovn-nbctl lsp-set-options ln-public network_name=public # schedule the gw router port to a chassis. Change the name of the chassis -ovn-nbctl --wait=hv lrp-set-gateway-chassis lr0-public hv1 20 +check ovn-nbctl --wait=hv lrp-set-gateway-chassis lr0-public hv1 20 OVN_POPULATE_ARP wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # And now for the anticlimax. We need to ensure that there is no # service monitor in the southbound db. @@ -26523,10 +26523,10 @@ ovn_attach n1 br-phys 192.168.0.1 ovs-vsctl add-port br-int vif1 -- \ set interface vif1 external-ids:iface-id=lp1 ofport-request=1 -ovn-nbctl ls-add lsw0 -ovn-nbctl lsp-add lsw0 lp1 -ovn-nbctl lsp-set-addresses lp1 "f0:00:00:00:00:01 10.0.0.1" -ovn-nbctl acl-add lsw0 from-lport 1000 'eth.type == 0x1234' drop +check ovn-nbctl ls-add lsw0 +check ovn-nbctl lsp-add lsw0 lp1 +check ovn-nbctl lsp-set-addresses lp1 "f0:00:00:00:00:01 10.0.0.1" +check ovn-nbctl acl-add lsw0 from-lport 1000 'eth.type == 0x1234' drop wait_for_ports_up check ovn-nbctl --wait=hv sync @@ -26535,7 +26535,7 @@ check ovn-nbctl --wait=hv sync AT_CHECK([ovn_trace --ovs lsw0 'inport == "lp1" && eth.type == 0x1234' | grep "dl_type=0x1234" | grep "cookie"], [0], [ignore]) # Replace the ACL with same match but different action. -ovn-nbctl acl-del lsw0 -- \ +check ovn-nbctl acl-del lsw0 -- \ acl-add lsw0 from-lport 1000 'eth.type == 0x1234' allow check ovn-nbctl --wait=hv sync @@ -26567,10 +26567,10 @@ ovn_start # Expected result: # Both lsp21 and lsp22 should received some of the packets. -ovn-nbctl lr-add lr1 +check ovn-nbctl lr-add lr1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 for i in 1 2; do ovn-nbctl lrp-add lr1 lrp-lr1-ls${i} 00:00:00:01:0${i}:01 192.168.${i}.1/24 @@ -26580,15 +26580,15 @@ for i in 1 2; do done #install static routes -ovn-nbctl lr-route-add lr1 10.0.0.0/24 192.168.2.21 -ovn-nbctl --ecmp lr-route-add lr1 10.0.0.0/24 192.168.2.22 +check ovn-nbctl lr-route-add lr1 10.0.0.0/24 192.168.2.21 +check ovn-nbctl --ecmp lr-route-add lr1 10.0.0.0/24 192.168.2.22 # Create logical ports -ovn-nbctl lsp-add ls1 lsp11 -- \ +check ovn-nbctl lsp-add ls1 lsp11 -- \ lsp-set-addresses lsp11 "f0:00:00:00:01:11 192.168.1.11" -ovn-nbctl lsp-add ls2 lsp21 -- \ +check ovn-nbctl lsp-add ls2 lsp21 -- \ lsp-set-addresses lsp21 "f0:00:00:00:02:21 192.168.2.21" -ovn-nbctl lsp-add ls2 lsp22 -- \ +check ovn-nbctl lsp-add ls2 lsp22 -- \ lsp-set-addresses lsp22 "f0:00:00:00:02:22 192.168.2.22" net_add n1 @@ -26678,10 +26678,10 @@ ovn_start # All packets should go out of a either lsp21 or lsp22 on hv1 # All packets should go out of the same port even on hv2 -ovn-nbctl lr-add lr1 +check ovn-nbctl lr-add lr1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 for i in 1 2; do ovn-nbctl lrp-add lr1 lrp-lr1-ls${i} 00:00:00:01:0${i}:01 192.168.${i}.1/24 @@ -26691,20 +26691,20 @@ for i in 1 2; do done #install static routes -ovn-nbctl lr-route-add lr1 10.0.0.0/24 192.168.2.21 +check ovn-nbctl lr-route-add lr1 10.0.0.0/24 192.168.2.21 route_uuid=$(fetch_column nb:logical_router_static_route _uuid nexthop="192.168.2.21") check ovn-nbctl set logical_router_static_route $route_uuid selection_fields="eth_src,ip_proto,ip_src,ip_dst,tp_dst" -ovn-nbctl --ecmp lr-route-add lr1 10.0.0.0/24 192.168.2.22 +check ovn-nbctl --ecmp lr-route-add lr1 10.0.0.0/24 192.168.2.22 route_uuid=$(fetch_column nb:logical_router_static_route _uuid nexthop="192.168.2.22") check ovn-nbctl set logical_router_static_route $route_uuid selection_fields="eth_dst,ip_proto,ip_src,ip_dst,tp_dst" # Create logical ports -ovn-nbctl lsp-add ls1 lsp11 -- \ +check ovn-nbctl lsp-add ls1 lsp11 -- \ lsp-set-addresses lsp11 "f0:00:00:00:01:11 192.168.1.11" -ovn-nbctl lsp-add ls2 lsp21 -- \ +check ovn-nbctl lsp-add ls2 lsp21 -- \ lsp-set-addresses lsp21 "f0:00:00:00:02:21 192.168.2.21" -ovn-nbctl lsp-add ls2 lsp22 -- \ +check ovn-nbctl lsp-add ls2 lsp22 -- \ lsp-set-addresses lsp22 "f0:00:00:00:02:22 192.168.2.22" net_add n1 @@ -26917,7 +26917,7 @@ ovn_start # Expected result: # lsp11 should receive traffic, lsp21 should not receive any traffic -ovn-nbctl lr-add lr1 +check ovn-nbctl lr-add lr1 for i in 1 2; do ovn-nbctl ls-add ls${i} @@ -26928,18 +26928,18 @@ for i in 1 2; do done # install static routes -ovn-nbctl lr-route-add lr1 0.0.0.0/0 192.168.2.21 -ovn-nbctl --route-table=rtb-1 lr-route-add lr1 1.1.1.1/32 192.168.2.22 +check ovn-nbctl lr-route-add lr1 0.0.0.0/0 192.168.2.21 +check ovn-nbctl --route-table=rtb-1 lr-route-add lr1 1.1.1.1/32 192.168.2.22 # set lrp-lr1-ls1 route table -ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 +check ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 # Create logical ports -ovn-nbctl lsp-add ls1 lsp11 -- \ +check ovn-nbctl lsp-add ls1 lsp11 -- \ lsp-set-addresses lsp11 "f0:00:00:00:01:11 192.168.1.11" -ovn-nbctl lsp-add ls2 lsp21 -- \ +check ovn-nbctl lsp-add ls2 lsp21 -- \ lsp-set-addresses lsp21 "f0:00:00:00:02:21 192.168.2.21" -ovn-nbctl lsp-add ls2 lsp22 -- \ +check ovn-nbctl lsp-add ls2 lsp22 -- \ lsp-set-addresses lsp22 "f0:00:00:00:02:22 192.168.2.22" net_add n1 @@ -27083,7 +27083,7 @@ ovn_start # Expected result: # lsp11 should receive traffic, lsp21 should not receive any traffic -ovn-nbctl lr-add lr1 +check ovn-nbctl lr-add lr1 for i in 1 2; do ovn-nbctl ls-add ls${i} @@ -27094,15 +27094,15 @@ for i in 1 2; do done # install static route, which is more specific than directly-connected route -ovn-nbctl --route-table=rtb-1 lr-route-add lr1 192.168.2.128/25 192.168.1.11 +check ovn-nbctl --route-table=rtb-1 lr-route-add lr1 192.168.2.128/25 192.168.1.11 # set lrp-lr1-ls1 route table -ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 +check ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 # Create logical ports -ovn-nbctl lsp-add ls1 lsp11 -- \ +check ovn-nbctl lsp-add ls1 lsp11 -- \ lsp-set-addresses lsp11 "f0:00:00:00:01:11 192.168.1.11" -ovn-nbctl lsp-add ls2 lsp21 -- \ +check ovn-nbctl lsp-add ls2 lsp21 -- \ lsp-set-addresses lsp21 "f0:00:00:00:02:21 192.168.2.21" net_add n1 @@ -27222,7 +27222,7 @@ ovn_start # Expected result: # lsp41 should receive traffic, lsp31 should not receive any traffic -ovn-nbctl lr-add lr1 +check ovn-nbctl lr-add lr1 # Create logical topology for i in $(seq 1 4); do @@ -27236,11 +27236,11 @@ for i in $(seq 1 4); do done # install static routes -ovn-nbctl --route-table=rtb-1 lr-route-add lr1 10.0.0.0/24 192.168.3.31 -ovn-nbctl lr-route-add lr1 10.0.0.0/24 192.168.4.41 +check ovn-nbctl --route-table=rtb-1 lr-route-add lr1 10.0.0.0/24 192.168.3.31 +check ovn-nbctl lr-route-add lr1 10.0.0.0/24 192.168.4.41 # set lrp-lr1-ls1 route table -ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 +check ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 net_add n1 sim_add hv1 @@ -27335,7 +27335,7 @@ ovn_start # Expected result: # lsp41 should receive traffic, lsp31 should not receive any traffic -ovn-nbctl lr-add lr1 +check ovn-nbctl lr-add lr1 # Create logical topology for i in $(seq 1 4); do @@ -27349,12 +27349,12 @@ for i in $(seq 1 4); do done # install static routes -ovn-nbctl --route-table=rtb-1 lr-route-add lr1 2001:db8:2000::/64 2001:db8:3::31 -ovn-nbctl --route-table=rtb-2 lr-route-add lr1 2001:db8:2000::/64 2001:db8:4::41 +check ovn-nbctl --route-table=rtb-1 lr-route-add lr1 2001:db8:2000::/64 2001:db8:3::31 +check ovn-nbctl --route-table=rtb-2 lr-route-add lr1 2001:db8:2000::/64 2001:db8:4::41 # set lrp-lr1-ls{1,2} route tables -ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 -ovn-nbctl lrp-set-options lrp-lr1-ls2 route_table=rtb-2 +check ovn-nbctl lrp-set-options lrp-lr1-ls1 route_table=rtb-1 +check ovn-nbctl lrp-set-options lrp-lr1-ls2 route_table=rtb-2 net_add n1 sim_add hv1 @@ -27625,33 +27625,33 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \ # traffic. # Also create "duplicate" load balancers, i.e., different VIPs using the same # backends. -ovn-nbctl ls-add sw -ovn-nbctl lsp-add sw lsp -- lsp-set-addresses lsp 00:00:00:00:00:01 -ovn-nbctl lb-add lb-ipv4-tcp 88.88.88.88:8080 42.42.42.1:4041 tcp -ovn-nbctl lb-add lb-ipv4-tcp-dup 88.88.88.89:8080 42.42.42.1:4041 tcp -ovn-nbctl lb-add lb-ipv4-udp 88.88.88.88:4040 42.42.42.1:2021 udp -ovn-nbctl lb-add lb-ipv4-udp-dup 88.88.88.89:4040 42.42.42.1:2021 udp -ovn-nbctl lb-add lb-ipv6-tcp [[8800::0088]]:8080 [[4200::1]]:4041 tcp -ovn-nbctl lb-add lb-ipv6-tcp-dup [[8800::0089]]:8080 [[4200::1]]:4041 tcp -ovn-nbctl lb-add lb-ipv6-udp [[8800::0088]]:4040 [[4200::1]]:2021 udp -ovn-nbctl lb-add lb-ipv6-udp-dup [[8800::0089]]:4040 [[4200::1]]:2021 udp -ovn-nbctl ls-lb-add sw lb-ipv4-tcp -ovn-nbctl ls-lb-add sw lb-ipv4-tcp-dup -ovn-nbctl ls-lb-add sw lb-ipv4-udp -ovn-nbctl ls-lb-add sw lb-ipv4-udp-dup -ovn-nbctl ls-lb-add sw lb-ipv6-tcp -ovn-nbctl ls-lb-add sw lb-ipv6-tcp-dup -ovn-nbctl ls-lb-add sw lb-ipv6-udp -ovn-nbctl ls-lb-add sw lb-ipv6-udp-dup - -ovn-nbctl lr-add rtr -ovn-nbctl lrp-add rtr rtr-sw 00:00:00:00:01:00 42.42.42.254/24 4200::00ff/64 -ovn-nbctl lsp-add sw sw-rtr \ +check ovn-nbctl ls-add sw +check ovn-nbctl lsp-add sw lsp -- lsp-set-addresses lsp 00:00:00:00:00:01 +check ovn-nbctl lb-add lb-ipv4-tcp 88.88.88.88:8080 42.42.42.1:4041 tcp +check ovn-nbctl lb-add lb-ipv4-tcp-dup 88.88.88.89:8080 42.42.42.1:4041 tcp +check ovn-nbctl lb-add lb-ipv4-udp 88.88.88.88:4040 42.42.42.1:2021 udp +check ovn-nbctl lb-add lb-ipv4-udp-dup 88.88.88.89:4040 42.42.42.1:2021 udp +check ovn-nbctl lb-add lb-ipv6-tcp [[8800::0088]]:8080 [[4200::1]]:4041 tcp +check ovn-nbctl lb-add lb-ipv6-tcp-dup [[8800::0089]]:8080 [[4200::1]]:4041 tcp +check ovn-nbctl lb-add lb-ipv6-udp [[8800::0088]]:4040 [[4200::1]]:2021 udp +check ovn-nbctl lb-add lb-ipv6-udp-dup [[8800::0089]]:4040 [[4200::1]]:2021 udp +check ovn-nbctl ls-lb-add sw lb-ipv4-tcp +check ovn-nbctl ls-lb-add sw lb-ipv4-tcp-dup +check ovn-nbctl ls-lb-add sw lb-ipv4-udp +check ovn-nbctl ls-lb-add sw lb-ipv4-udp-dup +check ovn-nbctl ls-lb-add sw lb-ipv6-tcp +check ovn-nbctl ls-lb-add sw lb-ipv6-tcp-dup +check ovn-nbctl ls-lb-add sw lb-ipv6-udp +check ovn-nbctl ls-lb-add sw lb-ipv6-udp-dup + +check ovn-nbctl lr-add rtr +check ovn-nbctl lrp-add rtr rtr-sw 00:00:00:00:01:00 42.42.42.254/24 4200::00ff/64 +check ovn-nbctl lsp-add sw sw-rtr \ -- lsp-set-type sw-rtr router \ -- lsp-set-addresses sw-rtr 00:00:00:00:01:00 \ -- lsp-set-options sw-rtr router-port=rtr-sw -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync wait_for_ports_up ovn-sbctl dump-flows > sbflows @@ -27692,7 +27692,7 @@ OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CHK_LB_HAI # Also flush conntrack to avoid reusing an existing entry. as hv1 ovs-appctl dpctl/flush-conntrack -ovn-nbctl --wait=hv set load_balancer lb-ipv4-tcp options:hairpin_snat_ip="88.88.88.87" +check ovn-nbctl --wait=hv set load_balancer lb-ipv4-tcp options:hairpin_snat_ip="88.88.88.87" # Inject IPv4 TCP packets from lsp. tcp_payload=$(build_tcp_syn 84d0 1f90 05a7) hp_tcp_payload=$(build_tcp_syn 84d0 0fc9 156f) @@ -27756,7 +27756,7 @@ OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CHK_LB_HAI # Change LB Hairpin SNAT IP. # Also flush conntrack to avoid reusing an existing entry. as hv1 ovs-appctl dpctl/flush-conntrack -ovn-nbctl --wait=hv set load_balancer lb-ipv4-udp options:hairpin_snat_ip="88.88.88.87" +check ovn-nbctl --wait=hv set load_balancer lb-ipv4-udp options:hairpin_snat_ip="88.88.88.87" # Inject IPv4 UDP packets from lsp. udp_payload=$(build_udp 84d0 0fc8 6666) hp_udp_payload=$(build_udp 84d0 07e5 6e4a) @@ -27824,7 +27824,7 @@ OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CHK_LB_HAI # Change LB Hairpin SNAT IP. # Also flush conntrack to avoid reusing an existing entry. as hv1 ovs-appctl dpctl/flush-conntrack -ovn-nbctl --wait=hv set load_balancer lb-ipv6-tcp options:hairpin_snat_ip="8800::0087" +check ovn-nbctl --wait=hv set load_balancer lb-ipv6-tcp options:hairpin_snat_ip="8800::0087" # Inject IPv6 TCP packets from lsp. tcp_payload=$(build_tcp_syn 84d0 1f90 3ff9) @@ -27897,7 +27897,7 @@ OVS_WAIT_FOR_OUTPUT([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CHK_LB_HAI # Change LB Hairpin SNAT IP. # Also flush conntrack to avoid reusing an existing entry. as hv1 ovs-appctl dpctl/flush-conntrack -ovn-nbctl --wait=hv set load_balancer lb-ipv6-udp options:hairpin_snat_ip="8800::0087" +check ovn-nbctl --wait=hv set load_balancer lb-ipv6-udp options:hairpin_snat_ip="8800::0087" # Inject IPv6 UDP packets from lsp. udp_payload=$(build_udp 84d0 0fc8 a0b8) @@ -27978,8 +27978,8 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([Big Load Balancer]) ovn_start -ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 lsp1 +check ovn-nbctl ls-add ls1 +check ovn-nbctl lsp-add ls1 lsp1 net_add n1 sim_add hv1 @@ -27996,8 +27996,8 @@ for i in `seq 1 9` ; do done done -ovn-nbctl lb-add lb0 172.172.0.1:8080 "${IPS}" -ovn-nbctl --wait=hv ls-lb-add ls1 lb0 +check ovn-nbctl lb-add lb0 172.172.0.1:8080 "${IPS}" +check ovn-nbctl --wait=hv ls-lb-add ls1 lb0 AT_CHECK([test 2287 = `ovs-ofctl dump-group-stats br-int | grep -o bucket | wc -l`]) @@ -28019,8 +28019,8 @@ OVS_WAIT_UNTIL([ovs-vsctl list Interface p1]) ovn_start -ovn-nbctl ls-add ls1 -ovn-nbctl --wait=sb lsp-add ls1 lsp1 +check ovn-nbctl ls-add ls1 +check ovn-nbctl --wait=sb lsp-add ls1 lsp1 # Simulate the fact that lsp1 had been previously bound on hv1. ovn-sbctl --id=@e1 create encap chassis_name=hv1 ip="192.168.0.1" type="geneve" \ @@ -28047,8 +28047,8 @@ sim_add hv1 ovn_start -ovn-nbctl ls-add ls1 -ovn-nbctl --wait=sb lsp-add ls1 lsp1 +check ovn-nbctl ls-add ls1 +check ovn-nbctl --wait=sb lsp-add ls1 lsp1 # Simulate the fact that lsp1 had been previously bound on hv1. ovn-sbctl --id=@e1 create encap chassis_name=hv1 ip="192.168.0.1" type="geneve" \ @@ -28269,7 +28269,7 @@ AT_CHECK([ grep "n_packets=0" -c) ]) -ovn-nbctl --wait=hv set logical_router_policy $pol1 options:pkt_mark=2 +check ovn-nbctl --wait=hv set logical_router_policy $pol1 options:pkt_mark=2 send_ipv4_pkt hv1 hv1-vif1 505400000003 00000000ff01 \ $(ip_to_hex 10 0 0 3) $(ip_to_hex 172 168 0 120) \ c3ad 83dc @@ -28357,25 +28357,25 @@ AT_CHECK([ovn-sbctl lflow-list | grep -E "lr_in_policy.*priority=1001" | ovn_str match=(ip6), action=(pkt.mark = 4294967295; reg8[[0..15]] = 0; next;) ]) -ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=-1 +check ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=-1 AT_CHECK([ovn-sbctl lflow-list | grep -E "lr_in_policy.*priority=1001" | ovn_strip_lflows], [0], [dnl table=??(lr_in_policy ), priority=1001 , dnl match=(ip6), action=(reg8[[0..15]] = 0; next;) ]) -ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=2147483648 +check ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=2147483648 AT_CHECK([ovn-sbctl lflow-list | grep -E "lr_in_policy.*priority=1001" | ovn_strip_lflows], [0], [dnl table=??(lr_in_policy ), priority=1001 , dnl match=(ip6), action=(pkt.mark = 2147483648; reg8[[0..15]] = 0; next;) ]) -ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=foo +check ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=foo AT_CHECK([ovn-sbctl lflow-list | grep -E "lr_in_policy.*priority=1001" | ovn_strip_lflows], [0], [dnl table=??(lr_in_policy ), priority=1001 , dnl match=(ip6), action=(reg8[[0..15]] = 0; next;) ]) -ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=4294967296 +check ovn-nbctl --wait=hv set logical_router_policy $pol5 options:pkt_mark=4294967296 AT_CHECK([ovn-sbctl lflow-list | grep -E "lr_in_policy.*priority=1001" | ovn_strip_lflows], [0], [dnl table=??(lr_in_policy ), priority=1001 , dnl match=(ip6), action=(reg8[[0..15]] = 0; next;) @@ -28389,8 +28389,8 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([normalized lrp-add]) ovn_start -ovn-nbctl lr-add r1 -ovn-nbctl lrp-add r1 rp1 CC:DD:EE:EE:DD:CC AEF0::1/64 BEF0::1/64 +check ovn-nbctl lr-add r1 +check ovn-nbctl lrp-add r1 rp1 CC:DD:EE:EE:DD:CC AEF0::1/64 BEF0::1/64 AT_CHECK([ovn-nbctl --may-exist lrp-add r1 rp1 cc:dd:ee:ee:dd:cc bef0:0000:0000:0000::1/64 aef0::1/64]) AT_CLEANUP @@ -28400,9 +28400,9 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([normalized lr-nat-add]) ovn_start -ovn-nbctl lr-add r1 -ovn-nbctl lr-nat-add r1 snat AEF0::1 BEEF::/64 -ovn-nbctl lr-nat-add r1 dnat AEF0::1 BEEF::1 +check ovn-nbctl lr-add r1 +check ovn-nbctl lr-nat-add r1 snat AEF0::1 BEEF::/64 +check ovn-nbctl lr-nat-add r1 dnat AEF0::1 BEEF::1 AT_CHECK([ovn-nbctl --may-exist lr-nat-add r1 snat aef0:0000::1 beef:0000::/ffff:ffff:ffff:ffff::0]) AT_CHECK([ovn-nbctl --may-exist lr-nat-add r1 dnat aef0:0000:00::1 beef::0001]) @@ -28413,9 +28413,9 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([normalized lr-nat-del]) ovn_start -ovn-nbctl lr-add r1 -ovn-nbctl lr-nat-add r1 snat AEF0::1 BEEF::/64 -ovn-nbctl lr-nat-add r1 dnat AEF0::1 BEEF::1 +check ovn-nbctl lr-add r1 +check ovn-nbctl lr-nat-add r1 snat AEF0::1 BEEF::/64 +check ovn-nbctl lr-nat-add r1 dnat AEF0::1 BEEF::1 AT_CHECK([ovn-nbctl --if-exists lr-nat-del r1 snat beef:0000::0/ffff:ffff:ffff:ffff::0]) AT_CHECK([ovn-nbctl --if-exists lr-nat-del r1 dnat aef0:0000:00::1]) @@ -28454,65 +28454,65 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \ options:rxq_pcap=hv2/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-add sw0 sw0-p2 -ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" -ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-add sw0 sw0-p2 +check ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" # Create port group and ACLs for sw0 ports. -ovn-nbctl pg-add pg0_drop sw0-p1 sw0-p2 -ovn-nbctl acl-add pg0_drop from-lport 1001 "inport == @pg0_drop && ip" drop -ovn-nbctl acl-add pg0_drop to-lport 1001 "outport == @pg0_drop && ip" drop +check ovn-nbctl pg-add pg0_drop sw0-p1 sw0-p2 +check ovn-nbctl acl-add pg0_drop from-lport 1001 "inport == @pg0_drop && ip" drop +check ovn-nbctl acl-add pg0_drop to-lport 1001 "outport == @pg0_drop && ip" drop -ovn-nbctl pg-add pg0 sw0-p1 sw0-p2 -ovn-nbctl acl-add pg0 from-lport 1002 "inport == @pg0 && ip4" allow-related -ovn-nbctl acl-add pg0 to-lport 1002 "outport == @pg0 && ip4 && ip4.src == 0.0.0.0/0 && icmp4" allow-related -ovn-nbctl acl-add pg0 to-lport 1002 "outport == @pg0 && ip4 && ip4.src == 0.0.0.0/0 && tcp && tcp.dst == 80" allow-related -ovn-nbctl acl-add pg0 to-lport 1002 "outport == @pg0 && ip4 && ip4.src == 0.0.0.0/0 && udp && udp.dst == 80" allow-related +check ovn-nbctl pg-add pg0 sw0-p1 sw0-p2 +check ovn-nbctl acl-add pg0 from-lport 1002 "inport == @pg0 && ip4" allow-related +check ovn-nbctl acl-add pg0 to-lport 1002 "outport == @pg0 && ip4 && ip4.src == 0.0.0.0/0 && icmp4" allow-related +check ovn-nbctl acl-add pg0 to-lport 1002 "outport == @pg0 && ip4 && ip4.src == 0.0.0.0/0 && tcp && tcp.dst == 80" allow-related +check ovn-nbctl acl-add pg0 to-lport 1002 "outport == @pg0 && ip4 && ip4.src == 0.0.0.0/0 && udp && udp.dst == 80" allow-related # Create the second logical switch with one port -ovn-nbctl ls-add sw1 -ovn-nbctl lsp-add sw1 sw1-p1 -ovn-nbctl lsp-set-addresses sw1-p1 "40:54:00:00:00:03 20.0.0.3" -ovn-nbctl lsp-set-port-security sw1-p1 "40:54:00:00:00:03 20.0.0.3" +check ovn-nbctl ls-add sw1 +check ovn-nbctl lsp-add sw1 sw1-p1 +check ovn-nbctl lsp-set-addresses sw1-p1 "40:54:00:00:00:03 20.0.0.3" +check ovn-nbctl lsp-set-port-security sw1-p1 "40:54:00:00:00:03 20.0.0.3" # Create port group and ACLs for sw1 ports. -ovn-nbctl pg-add pg1_drop sw1-p1 -ovn-nbctl acl-add pg1_drop from-lport 1001 "inport == @pg1_drop && ip" drop -ovn-nbctl acl-add pg1_drop to-lport 1001 "outport == @pg1_drop && ip" drop +check ovn-nbctl pg-add pg1_drop sw1-p1 +check ovn-nbctl acl-add pg1_drop from-lport 1001 "inport == @pg1_drop && ip" drop +check ovn-nbctl acl-add pg1_drop to-lport 1001 "outport == @pg1_drop && ip" drop -ovn-nbctl pg-add pg1 sw1-p1 -ovn-nbctl acl-add pg1 from-lport 1002 "inport == @pg1 && ip4" allow-related -ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4 && ip4.src == 0.0.0.0/0 && icmp4" allow-related -ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4 && ip4.src == 0.0.0.0/0 && tcp && tcp.dst == 80" allow-related -ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4 && ip4.src == 0.0.0.0/0 && udp && udp.dst == 80" allow-related +check ovn-nbctl pg-add pg1 sw1-p1 +check ovn-nbctl acl-add pg1 from-lport 1002 "inport == @pg1 && ip4" allow-related +check ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4 && ip4.src == 0.0.0.0/0 && icmp4" allow-related +check ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4 && ip4.src == 0.0.0.0/0 && tcp && tcp.dst == 80" allow-related +check ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4 && ip4.src == 0.0.0.0/0 && udp && udp.dst == 80" allow-related # Create a logical router and attach both logical switches. # Make the logical router a GW router for load balancing to be supported. -ovn-nbctl lr-add lr0 -ovn-nbctl set logical_router lr0 options:chassis=hv1 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 -ovn-nbctl lsp-add sw0 sw0-lr0 -ovn-nbctl lsp-set-type sw0-lr0 router -ovn-nbctl lsp-set-addresses sw0-lr0 router -ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 - -ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 -ovn-nbctl lsp-add sw1 sw1-lr0 -ovn-nbctl lsp-set-type sw1-lr0 router -ovn-nbctl lsp-set-addresses sw1-lr0 router -ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 - -ovn-nbctl lb-add lb1 10.0.0.10:80 10.0.0.3:80,20.0.0.3:80 +check ovn-nbctl lr-add lr0 +check ovn-nbctl set logical_router lr0 options:chassis=hv1 +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 +check ovn-nbctl lsp-add sw0 sw0-lr0 +check ovn-nbctl lsp-set-type sw0-lr0 router +check ovn-nbctl lsp-set-addresses sw0-lr0 router +check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 + +check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 +check ovn-nbctl lsp-add sw1 sw1-lr0 +check ovn-nbctl lsp-set-type sw1-lr0 router +check ovn-nbctl lsp-set-addresses sw1-lr0 router +check ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 + +check ovn-nbctl lb-add lb1 10.0.0.10:80 10.0.0.3:80,20.0.0.3:80 lb1_uuid=$(ovn-nbctl --bare --columns _uuid list load_balancer) -ovn-nbctl ls-lb-add sw0 lb1 -ovn-nbctl ls-lb-add sw1 lb1 -ovn-nbctl lr-lb-add lr0 lb1 +check ovn-nbctl ls-lb-add sw0 lb1 +check ovn-nbctl ls-lb-add sw1 lb1 +check ovn-nbctl lr-lb-add lr0 lb1 OVS_WAIT_UNTIL([ test $(as hv1 ovs-ofctl dump-groups br-int | \ @@ -28526,7 +28526,7 @@ OVS_WAIT_UNTIL([ echo "lb1_uuid = $lb1_uuid" -ovn-nbctl set load_balancer $lb1_uuid selection_fields="ip_src,ip_dst,tp_src,tp_dst" +check ovn-nbctl set load_balancer $lb1_uuid selection_fields="ip_src,ip_dst,tp_src,tp_dst" OVS_WAIT_UNTIL([ test $(as hv1 ovs-ofctl dump-groups br-int | \ @@ -28539,7 +28539,7 @@ OVS_WAIT_UNTIL([ ]) # Change the protocol to udp. -ovn-nbctl set load_balancer $lb1_uuid protocol=udp +check ovn-nbctl set load_balancer $lb1_uuid protocol=udp OVS_WAIT_UNTIL([ test $(as hv1 ovs-ofctl dump-groups br-int | \ grep "selection_method=hash,fields(ip_src,ip_dst,udp_src,udp_dst)" -c) -eq 2 @@ -28551,7 +28551,7 @@ OVS_WAIT_UNTIL([ ]) # Change the protocol to udp. -ovn-nbctl set load_balancer $lb1_uuid protocol=sctp +check ovn-nbctl set load_balancer $lb1_uuid protocol=sctp OVS_WAIT_UNTIL([ test $(as hv1 ovs-ofctl dump-groups br-int | \ grep "selection_method=hash,fields(ip_src,ip_dst,sctp_src,sctp_dst)" -c) -eq 2 @@ -28562,7 +28562,7 @@ OVS_WAIT_UNTIL([ grep "selection_method=hash,fields(ip_src,ip_dst,sctp_src,sctp_dst)" -c) -eq 1 ]) -ovn-nbctl set load_balancer $lb1_uuid selection_fields="ip_src,ip_dst,tp_dst" +check ovn-nbctl set load_balancer $lb1_uuid selection_fields="ip_src,ip_dst,tp_dst" OVS_WAIT_UNTIL([ test $(as hv1 ovs-ofctl dump-groups br-int | \ grep "selection_method=hash,fields(ip_src,ip_dst,sctp_dst)" -c) -eq 2 @@ -28594,17 +28594,17 @@ as hv2 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.2 -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-add sw0 sw0-p2 -ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" -ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-add sw0 sw0-p2 +check ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-sbctl dump-flows > sbflows AT_CAPTURE_FILE([sbflows]) @@ -28647,7 +28647,7 @@ hv2_offlows=$(as hv2 ovs-ofctl dump-flows br-int | wc -l) echo "hv2 flows : $hv2_offlows" AT_CHECK([test $hv2_offlows -gt 0]) -ovn-nbctl ls-del sw0 +check ovn-nbctl ls-del sw0 as hv1 ovs-vsctl del-port hv1-vif1 as hv2 ovs-vsctl del-port hv2-vif1 @@ -28658,17 +28658,17 @@ as hv2 ovs-vsctl set open . external_ids:ovn-monitor-all=true wait_row_count Chassis 1 name=hv1 other_config:ovn-monitor-all=true wait_row_count Chassis 1 name=hv2 other_config:ovn-monitor-all=true -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-add sw0 sw0-p2 -ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" -ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-add sw0 sw0-p2 +check ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync ovn-sbctl dump-flows > sbflows2 AT_CAPTURE_FILE([sbflows2]) @@ -28740,20 +28740,20 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \ options:rxq_pcap=hv1/vif1-rx.pcap \ ofport-request=1 -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-set-addresses sw0-p1 "00:00:00:01:01:02 192.168.1.2" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-set-addresses sw0-p1 "00:00:00:01:01:02 192.168.1.2" -ovn-nbctl lsp-add sw0 sw0-lr0 -ovn-nbctl lsp-set-type sw0-lr0 router -ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 -ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:00:01 +check ovn-nbctl lsp-add sw0 sw0-lr0 +check ovn-nbctl lsp-set-type sw0-lr0 router +check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 +check ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:00:01 -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:00:01 192.168.1.1/24 aef0:0:0:0:0:0:0:1/64 +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:00:01 192.168.1.1/24 aef0:0:0:0:0:0:0:1/64 wait_for_ports_up sw0-p1 -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync sw0_dpkey=$(ovn-sbctl --bare --columns tunnel_key list datapath_binding sw0) lr0_dpkey=$(ovn-sbctl --bare --columns tunnel_key list datapath_binding lr0) @@ -28808,15 +28808,15 @@ as hv1 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3" +check ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3" -ovn-nbctl lsp-add sw0 sw0-p2 -ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" -ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-add sw0 sw0-p2 +check ovn-nbctl lsp-set-addresses sw0-p2 "50:54:00:00:00:04 10.0.0.4" +check ovn-nbctl lsp-set-port-security sw0-p2 "50:54:00:00:00:04 10.0.0.4" as hv1 ovs-vsctl -- add-port br-int hv1-vif1 -- \ @@ -28887,7 +28887,7 @@ reg15=0x${p2_dpkey} | grep REG13 | wc -l) -eq 0]) p2_zoneid=$(as hv1 ovs-vsctl get bridge br-int external_ids:ct-zone-sw0-p2 | sed 's/"//g') AT_CHECK([test -z $p2_zoneid]) -ovn-nbctl lsp-del sw0-p1 +check ovn-nbctl lsp-del sw0-p1 OVS_WAIT_UNTIL([test $(ovs-ofctl dump-flows br-int table=OFTABLE_LOCAL_OUTPUT,metadata=${sw0_dpkey},\ reg15=0x${p1_dpkey} | grep REG13 | wc -l) -eq 0]) @@ -28999,8 +28999,8 @@ AT_CHECK([ ]) # Now make GW a gateway router on hv1 -ovn-nbctl set Logical_Router $gw_uuid options:chassis=hv1 -ovn-nbctl --wait=hv sync +check ovn-nbctl set Logical_Router $gw_uuid options:chassis=hv1 +check ovn-nbctl --wait=hv sync ovn-sbctl list logical_flow > lflows # And ensure that ECMP symmetric reply flows are present only on hv1 @@ -29129,8 +29129,8 @@ AT_CHECK([ ]) # Now make GW a gateway router on hv1 -ovn-nbctl set Logical_Router $gw_uuid options:chassis=hv1 -ovn-nbctl --wait=hv sync +check ovn-nbctl set Logical_Router $gw_uuid options:chassis=hv1 +check ovn-nbctl --wait=hv sync # And ensure that ECMP symmetric reply flows are present only on hv1 as hv1 ovs-ofctl dump-flows br-int > hv1flows @@ -29171,43 +29171,43 @@ ovn_start # in 10.0.0.0/24 network. # R1 is connected to S1 (10.0.1.0/24), R2 is connected to S2 (10.0.2.0/24) -ovn-nbctl lr-add r1 -- set logical_router r1 option:dynamic_neigh_routers=true -ovn-nbctl lr-add r2 -- set logical_router r2 option:dynamic_neigh_routers=true +check ovn-nbctl lr-add r1 -- set logical_router r1 option:dynamic_neigh_routers=true +check ovn-nbctl lr-add r2 -- set logical_router r2 option:dynamic_neigh_routers=true -ovn-nbctl ls-add s1 -ovn-nbctl ls-add s2 -ovn-nbctl ls-add join +check ovn-nbctl ls-add s1 +check ovn-nbctl ls-add s2 +check ovn-nbctl ls-add join # Connnect r1 to s1. -ovn-nbctl lrp-add r1 lrp-r1-s1 00:00:00:00:01:01 10.0.1.1/24 -ovn-nbctl lsp-add s1 lsp-s1-r1 -- set Logical_Switch_Port lsp-s1-r1 type=router \ +check ovn-nbctl lrp-add r1 lrp-r1-s1 00:00:00:00:01:01 10.0.1.1/24 +check ovn-nbctl lsp-add s1 lsp-s1-r1 -- set Logical_Switch_Port lsp-s1-r1 type=router \ options:router-port=lrp-r1-s1 addresses=router # Connnect r2 to s2. -ovn-nbctl lrp-add r2 lrp-r2-s2 00:00:00:00:02:01 10.0.2.1/24 -ovn-nbctl lsp-add s2 lsp-s2-r2 -- set Logical_Switch_Port lsp-s2-r2 type=router \ +check ovn-nbctl lrp-add r2 lrp-r2-s2 00:00:00:00:02:01 10.0.2.1/24 +check ovn-nbctl lsp-add s2 lsp-s2-r2 -- set Logical_Switch_Port lsp-s2-r2 type=router \ options:router-port=lrp-r2-s2 addresses=router # Connect r1 to join -ovn-nbctl lrp-add r1 lrp-r1-join 00:00:00:00:03:01 10.0.0.1/24 -ovn-nbctl lsp-add join lsp-join-r1 -- set Logical_Switch_Port lsp-join-r1 \ +check ovn-nbctl lrp-add r1 lrp-r1-join 00:00:00:00:03:01 10.0.0.1/24 +check ovn-nbctl lsp-add join lsp-join-r1 -- set Logical_Switch_Port lsp-join-r1 \ type=router options:router-port=lrp-r1-join addresses=router # Connect r2 to join -ovn-nbctl lrp-add r2 lrp-r2-join 00:00:00:00:03:02 10.0.0.2/24 -ovn-nbctl lsp-add join lsp-join-r2 -- set Logical_Switch_Port lsp-join-r2 \ +check ovn-nbctl lrp-add r2 lrp-r2-join 00:00:00:00:03:02 10.0.0.2/24 +check ovn-nbctl lsp-add join lsp-join-r2 -- set Logical_Switch_Port lsp-join-r2 \ type=router options:router-port=lrp-r2-join addresses=router #install static routes -ovn-nbctl lr-route-add r1 10.0.2.0/24 10.0.0.2 -ovn-nbctl lr-route-add r2 10.0.1.0/24 10.0.0.1 +check ovn-nbctl lr-route-add r1 10.0.2.0/24 10.0.0.2 +check ovn-nbctl lr-route-add r2 10.0.1.0/24 10.0.0.1 # Create logical port p1 in s1 -ovn-nbctl lsp-add s1 p1 \ +check ovn-nbctl lsp-add s1 p1 \ -- lsp-set-addresses p1 "f0:00:00:00:01:02 10.0.1.2" # Create logical port p2 in s2 -ovn-nbctl lsp-add s2 p2 \ +check ovn-nbctl lsp-add s2 p2 \ -- lsp-set-addresses p2 "f0:00:00:00:02:02 10.0.2.2" # Create two hypervisor and create OVS ports corresponding to logical ports. @@ -29240,7 +29240,7 @@ ovs-vsctl -- add-port br-int hv2-vif1 -- \ OVN_POPULATE_ARP wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync AT_CHECK([ovn-sbctl lflow-list | grep lr_in_arp_resolve | grep -F 10.0.0.1], [1], []) AT_CHECK([ovn-sbctl lflow-list | grep lr_in_arp_resolve | grep -F 10.0.0.2], [1], []) @@ -29361,8 +29361,8 @@ as hv1 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.10 -ovn-nbctl ls-add ls -ovn-nbctl lsp-add ls lsp +check ovn-nbctl ls-add ls +check ovn-nbctl lsp-add ls lsp as hv1 ovs-vsctl \ -- add-port br-int vif1 \ @@ -29378,7 +29378,7 @@ as hv1 ovn-appctl -t ovn-controller debug/pause # Delete port binding and OVS port. The updates will be processed in the same # loop in ovn-controller when it resumes. -ovn-nbctl --wait=sb lsp-del lsp +check ovn-nbctl --wait=sb lsp-del lsp as hv1 ovs-vsctl del-port vif1 # Resume ovn-controller. @@ -29539,32 +29539,32 @@ AT_CLEANUP m4_define([TEST_LR_DROP_TRAFFIC_FOR_OWN_IPS], [ ovn_start -ovn-nbctl lr-add r1 # Gateway router or LR with DGP on the ext side -ovn-nbctl ls-add ext # simulate external LS -ovn-nbctl ls-add s2 # simulate internal LS +check ovn-nbctl lr-add r1 # Gateway router or LR with DGP on the ext side +check ovn-nbctl ls-add ext # simulate external LS +check ovn-nbctl ls-add s2 # simulate internal LS # Connnect r1 to ext. -ovn-nbctl lrp-add r1 lrp-r1-ext 00:00:00:00:01:01 10.0.1.1/24 +check ovn-nbctl lrp-add r1 lrp-r1-ext 00:00:00:00:01:01 10.0.1.1/24 if test X"$1" = X"DGP"; then ovn-nbctl lrp-set-gateway-chassis lrp-r1-ext hv1 1 else ovn-nbctl set logical_router r1 options:chassis=hv1 fi -ovn-nbctl lsp-add ext lsp-ext-r1 -- set Logical_Switch_Port lsp-ext-r1 type=router \ +check ovn-nbctl lsp-add ext lsp-ext-r1 -- set Logical_Switch_Port lsp-ext-r1 type=router \ options:router-port=lrp-r1-ext addresses=router # Connnect r1 to s2. -ovn-nbctl lrp-add r1 lrp-r1-s2 00:00:00:00:02:01 10.0.2.1/24 -ovn-nbctl lsp-add s2 lsp-s2-r1 -- set Logical_Switch_Port lsp-s2-r1 type=router \ +check ovn-nbctl lrp-add r1 lrp-r1-s2 00:00:00:00:02:01 10.0.2.1/24 +check ovn-nbctl lsp-add s2 lsp-s2-r1 -- set Logical_Switch_Port lsp-s2-r1 type=router \ options:router-port=lrp-r1-s2 addresses=router # Create logical port p1 in ext -ovn-nbctl lsp-add ext p1 \ +check ovn-nbctl lsp-add ext p1 \ -- lsp-set-addresses p1 "f0:00:00:00:01:02 10.0.1.2" \ -- lsp-set-port-security p1 "f0:00:00:00:01:02 10.0.1.2" # Create logical port p2 in s2 -ovn-nbctl lsp-add s2 p2 \ +check ovn-nbctl lsp-add s2 p2 \ -- lsp-set-addresses p2 "f0:00:00:00:02:02 10.0.2.2" # Create two hypervisor and create OVS ports corresponding to logical ports. @@ -29592,7 +29592,7 @@ ovs-vsctl -- add-port br-int hv1-vif2 -- \ OVN_POPULATE_ARP wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Get the OF table numbers arp_resolve=$(ovn-debug lflow-stage-to-oftable lr_in_arp_resolve) @@ -29621,8 +29621,8 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep -E "table=$(ovn-debug lflow- ]) # Use the router IP as SNAT IP. -ovn-nbctl lr-nat-add r1 snat 10.0.1.1 10.8.8.0/24 -ovn-nbctl --wait=hv sync +check ovn-nbctl lr-nat-add r1 snat 10.0.1.1 10.8.8.0/24 +check ovn-nbctl --wait=hv sync # Send ip packets from p1 to lrp-r1-ext src_mac="f00000000102" @@ -29748,7 +29748,7 @@ check test "$sbs1" = 0 check test "$hvs1" = 0 # Force a sequence number change and check the new timestamps -ovn-nbctl --wait=hv ls-add s1 +check ovn-nbctl --wait=hv ls-add s1 get_cfg 2 check test "$nbs2" = 1 check test "$nbt2" -gt 0 @@ -29760,7 +29760,7 @@ check test "$hvt2" -gt 0 sleep 1 OVN_CONTROLLER_EXIT([hv3]) wait_for_ports_up -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync wait_row_count Chassis_Private 9 name!=hv3 nb_cfg=2 check_row_count Chassis_Private 1 name=hv3 nb_cfg=1 @@ -29839,105 +29839,105 @@ ovs-vsctl -- add-port br-int hv3-vif1 -- \ AT_CHECK([ovs-vsctl set Open_vSwitch . external-ids:ovn-bridge-mappings=physnet1:br-phys]) ovs-vsctl set open . external_ids:ovn-enable-lflow-cache=false -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-port1 -ovn-nbctl lsp-set-addresses sw0-port1 "10:54:00:00:00:03 10.0.0.3 1000::3" -ovn-nbctl lsp-add sw0 sw0-port2 -ovn-nbctl lsp-set-addresses sw0-port2 "10:54:00:00:00:04 10.0.0.4 1000::4" - -ovn-nbctl ls-add sw1 -ovn-nbctl lsp-add sw1 sw1-port1 -ovn-nbctl lsp-set-addresses sw1-port1 "40:54:00:00:00:03 20.0.0.3 2000::3" - -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 1000::a/64 -ovn-nbctl lsp-add sw0 sw0-lr0 -ovn-nbctl lsp-set-type sw0-lr0 router -ovn-nbctl lsp-set-addresses sw0-lr0 router -ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 - -ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 2000::a/64 -ovn-nbctl lsp-add sw1 sw1-lr0 -ovn-nbctl lsp-set-type sw1-lr0 router -ovn-nbctl lsp-set-addresses sw1-lr0 router -ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 - -ovn-nbctl ls-add public -ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 172.16.0.100/24 3000::a/64 -ovn-nbctl lsp-add public public-lr0 -ovn-nbctl lsp-set-type public-lr0 router -ovn-nbctl lsp-set-addresses public-lr0 router -ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-port1 +check ovn-nbctl lsp-set-addresses sw0-port1 "10:54:00:00:00:03 10.0.0.3 1000::3" +check ovn-nbctl lsp-add sw0 sw0-port2 +check ovn-nbctl lsp-set-addresses sw0-port2 "10:54:00:00:00:04 10.0.0.4 1000::4" + +check ovn-nbctl ls-add sw1 +check ovn-nbctl lsp-add sw1 sw1-port1 +check ovn-nbctl lsp-set-addresses sw1-port1 "40:54:00:00:00:03 20.0.0.3 2000::3" + +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 1000::a/64 +check ovn-nbctl lsp-add sw0 sw0-lr0 +check ovn-nbctl lsp-set-type sw0-lr0 router +check ovn-nbctl lsp-set-addresses sw0-lr0 router +check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 + +check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 2000::a/64 +check ovn-nbctl lsp-add sw1 sw1-lr0 +check ovn-nbctl lsp-set-type sw1-lr0 router +check ovn-nbctl lsp-set-addresses sw1-lr0 router +check ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 + +check ovn-nbctl ls-add public +check ovn-nbctl lrp-add lr0 lr0-public 00:00:20:20:12:13 172.16.0.100/24 3000::a/64 +check ovn-nbctl lsp-add public public-lr0 +check ovn-nbctl lsp-set-type public-lr0 router +check ovn-nbctl lsp-set-addresses public-lr0 router +check ovn-nbctl lsp-set-options public-lr0 router-port=lr0-public # localnet port -ovn-nbctl lsp-add public ln-public -ovn-nbctl lsp-set-type ln-public localnet -ovn-nbctl lsp-set-addresses ln-public unknown -ovn-nbctl lsp-set-options ln-public network_name=physnet1 +check ovn-nbctl lsp-add public ln-public +check ovn-nbctl lsp-set-type ln-public localnet +check ovn-nbctl lsp-set-addresses ln-public unknown +check ovn-nbctl lsp-set-options ln-public network_name=physnet1 # schedule the gw router port to a chassis. -ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 20 +check ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 20 # Create NAT entries for the ports # sw0-port1 -ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.110 10.0.0.3 sw0-port1 30:54:00:00:00:03 -ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::c 1000::3 sw0-port1 40:54:00:00:00:03 +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.110 10.0.0.3 sw0-port1 30:54:00:00:00:03 +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::c 1000::3 sw0-port1 40:54:00:00:00:03 # sw1-port1 -ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.120 20.0.0.3 sw1-port1 30:54:00:00:00:04 -ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::d 2000::3 sw1-port1 40:54:00:00:00:04 +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.120 20.0.0.3 sw1-port1 30:54:00:00:00:04 +check ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::d 2000::3 sw1-port1 40:54:00:00:00:04 # Add snat entriess -ovn-nbctl lr-nat-add lr0 snat 172.16.0.100 10.0.0.0/24 -ovn-nbctl lr-nat-add lr0 snat 172.16.0.101 10.0.0.10 -ovn-nbctl lr-nat-add lr0 snat 172.16.0.102 10.0.0.11 -ovn-nbctl lr-nat-add lr0 snat 172.16.0.100 20.0.0.0/24 +check ovn-nbctl lr-nat-add lr0 snat 172.16.0.100 10.0.0.0/24 +check ovn-nbctl lr-nat-add lr0 snat 172.16.0.101 10.0.0.10 +check ovn-nbctl lr-nat-add lr0 snat 172.16.0.102 10.0.0.11 +check ovn-nbctl lr-nat-add lr0 snat 172.16.0.100 20.0.0.0/24 -ovn-nbctl ls-add sw3 -ovn-nbctl lsp-add sw3 sw3-port1 -ovn-nbctl lsp-set-addresses sw3-port1 "20:14:00:00:00:03 30.0.0.3 3000::3" +check ovn-nbctl ls-add sw3 +check ovn-nbctl lsp-add sw3 sw3-port1 +check ovn-nbctl lsp-set-addresses sw3-port1 "20:14:00:00:00:03 30.0.0.3 3000::3" -ovn-nbctl lr-add lr1 -ovn-nbctl lrp-add lr1 lr1-sw3 00:00:00:10:ff:03 30.0.0.1/24 3000::a/64 -ovn-nbctl lsp-add sw3 sw3-lr1 -ovn-nbctl lsp-set-type sw3-lr1 router -ovn-nbctl lsp-set-addresses sw3-lr1 router -ovn-nbctl lsp-set-options sw3-lr1 router-port=lr1-sw3 +check ovn-nbctl lr-add lr1 +check ovn-nbctl lrp-add lr1 lr1-sw3 00:00:00:10:ff:03 30.0.0.1/24 3000::a/64 +check ovn-nbctl lsp-add sw3 sw3-lr1 +check ovn-nbctl lsp-set-type sw3-lr1 router +check ovn-nbctl lsp-set-addresses sw3-lr1 router +check ovn-nbctl lsp-set-options sw3-lr1 router-port=lr1-sw3 -ovn-nbctl ls-add join +check ovn-nbctl ls-add join # Connect lr1 to join -ovn-nbctl lrp-add lr1 lr1-join 00:00:04:01:02:03 170.0.0.1/24 -ovn-nbctl lsp-add join join-lr1 -ovn-nbctl lsp-set-type join-lr1 router -ovn-nbctl lsp-set-addresses join-lr1 router -ovn-nbctl lsp-set-options join-lr1 router-port=lr1-join +check ovn-nbctl lrp-add lr1 lr1-join 00:00:04:01:02:03 170.0.0.1/24 +check ovn-nbctl lsp-add join join-lr1 +check ovn-nbctl lsp-set-type join-lr1 router +check ovn-nbctl lsp-set-addresses join-lr1 router +check ovn-nbctl lsp-set-options join-lr1 router-port=lr1-join # Create GW router -ovn-nbctl lr-add gw_router +check ovn-nbctl lr-add gw_router # connect gw_router to join -ovn-nbctl lrp-add gw_router gw_router-join 00:00:03:11:12:13 170.0.0.2/24 -ovn-nbctl lsp-add join join-gw_router -ovn-nbctl lsp-set-type join-gw_router router -ovn-nbctl lsp-set-addresses join-gw_router router -ovn-nbctl lsp-set-options join-gw_router router-port=gw_router-join +check ovn-nbctl lrp-add gw_router gw_router-join 00:00:03:11:12:13 170.0.0.2/24 +check ovn-nbctl lsp-add join join-gw_router +check ovn-nbctl lsp-set-type join-gw_router router +check ovn-nbctl lsp-set-addresses join-gw_router router +check ovn-nbctl lsp-set-options join-gw_router router-port=gw_router-join # Connect gw_router to public -ovn-nbctl lrp-add gw_router gw_router-public 00:00:30:30:32:33 172.16.0.200/24 3000::b/64 -ovn-nbctl lsp-add public public-gw_router -ovn-nbctl lsp-set-type public-gw_router router -ovn-nbctl lsp-set-addresses public-gw_router router -ovn-nbctl lsp-set-options public-gw_router router-port=gw_router-public +check ovn-nbctl lrp-add gw_router gw_router-public 00:00:30:30:32:33 172.16.0.200/24 3000::b/64 +check ovn-nbctl lsp-add public public-gw_router +check ovn-nbctl lsp-set-type public-gw_router router +check ovn-nbctl lsp-set-addresses public-gw_router router +check ovn-nbctl lsp-set-options public-gw_router router-port=gw_router-public # Pin gw_router to hv3 -ovn-nbctl set logical_router gw_router options:chassis=hv3 +check ovn-nbctl set logical_router gw_router options:chassis=hv3 # Add snat entries on gw_router -ovn-nbctl lr-nat-add gw_router snat 172.16.0.200 30.0.0.0/24 -ovn-nbctl lr-nat-add gw_router snat 172.16.0.201 30.0.0.3 +check ovn-nbctl lr-nat-add gw_router snat 172.16.0.200 30.0.0.0/24 +check ovn-nbctl lr-nat-add gw_router snat 172.16.0.201 30.0.0.3 wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Create an interface in br-phys in hv2 and send ARP request for 172.16.0.100 as hv2 @@ -30008,9 +30008,9 @@ test_arp_response 000030303233 $(ip_to_hex 172 16 0 200) hv3 hv1 hv2 test_arp_response 000030303233 $(ip_to_hex 172 16 0 201) hv3 hv1 hv2 # Make hv3 claim the cr-lr0-public -ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 20 -ovn-nbctl lrp-set-gateway-chassis lr0-public hv2 30 -ovn-nbctl lrp-set-gateway-chassis lr0-public hv3 40 +check ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 20 +check ovn-nbctl lrp-set-gateway-chassis lr0-public hv2 30 +check ovn-nbctl lrp-set-gateway-chassis lr0-public hv3 40 hv3_uuid=$(ovn-sbctl --bare --columns _uuid list chassis hv3) @@ -30024,7 +30024,7 @@ test_arp_response 000020201213 $(ip_to_hex 172 16 0 101) hv3 hv1 hv2 test_arp_response 000020201213 $(ip_to_hex 172 16 0 102) hv3 hv1 hv2 # Schedule gw_router on hv1. -ovn-nbctl set logical_router gw_router options:chassis=hv1 +check ovn-nbctl set logical_router gw_router options:chassis=hv1 hv1_uuid=$(ovn-sbctl --bare --columns _uuid list chassis hv1) OVS_WAIT_UNTIL([ @@ -30168,12 +30168,12 @@ AT_SETUP([conflict ACLs with address set]) TAG_UNSTABLE ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 lsp1 \ +check ovn-nbctl lsp-add ls1 lsp1 \ -- lsp-set-addresses lsp1 "f0:00:00:00:00:01 10.0.0.1" -ovn-nbctl lsp-add ls1 lsp2 \ +check ovn-nbctl lsp-add ls1 lsp2 \ -- lsp-set-addresses lsp2 "f0:00:00:00:00:02 10.0.0.2" net_add n1 @@ -30195,7 +30195,7 @@ ovs-vsctl -- add-port br-int hv1-vif2 -- \ ofport-request=2 # Default drop -ovn-nbctl acl-add ls1 to-lport 1000 \ +check ovn-nbctl acl-add ls1 to-lport 1000 \ 'outport == "lsp1" && ip4' drop # test_ip INPORT SRC_MAC DST_MAC SRC_IP DST_IP OUTPORT... @@ -30224,12 +30224,12 @@ addresses=\"10.0.0.2\",\"10.0.0.3\" # Create overlapping ACLs resulting in conflict desired OVS flows # Add ACL1 uses the address set -ovn-nbctl --wait=hv acl-add ls1 to-lport 1001 \ +check ovn-nbctl --wait=hv acl-add ls1 to-lport 1001 \ 'outport == "lsp1" && ip4 && ip4.src == $as1' allow # Add ACL2 which uses a single IP, which shouldn't take effect because # when it is added incrementally there is already a conflict one installed. -ovn-nbctl --wait=hv acl-add ls1 to-lport 1001 \ +check ovn-nbctl --wait=hv acl-add ls1 to-lport 1001 \ 'outport == "lsp1" && ip4 && ip4.src == 10.0.0.2' drop @@ -30240,13 +30240,13 @@ OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected]) # Update the address set which causes flow reprocessing but the OVS flow # for allowing 10.0.0.2 should keep unchanged -ovn-nbctl --wait=hv set Address_Set as1 addresses=\"10.0.0.2\" +check ovn-nbctl --wait=hv set Address_Set as1 addresses=\"10.0.0.2\" test_ip 2 f00000000002 f00000000001 $sip $dip 1 OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected]) # Delete the ACL1 that has "allow" action -ovn-nbctl --wait=hv acl-del ls1 to-lport 1001 \ +check ovn-nbctl --wait=hv acl-del ls1 to-lport 1001 \ 'outport == "lsp1" && ip4 && ip4.src == $as1' # ACL2 should take effect and packet should be dropped @@ -30260,9 +30260,9 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([port bind/unbind change handling with conj flows - IPv6]) ovn_start -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 -ovn-nbctl lsp-add ls1 lsp1 \ +check ovn-nbctl lsp-add ls1 lsp1 \ -- lsp-set-addresses lsp1 "f0:00:00:00:00:01 2001::1" \ -- lsp-set-port-security lsp1 "f0:00:00:00:00:01 2001::1" @@ -30279,7 +30279,7 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \ ofport-request=1 wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Expected conjunction flows: None OVS_WAIT_UNTIL([test 0 = `as hv1 ovs-ofctl dump-flows br-int | \ @@ -30314,9 +30314,9 @@ as hv1 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.10 -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-p1 -ovn-nbctl lsp-add sw0 sw0-p2 +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-p1 +check ovn-nbctl lsp-add sw0 sw0-p2 as hv1 ovs-vsctl \ -- add-port br-int vif1 \ @@ -30332,7 +30332,7 @@ as hv1 ovs-vsctl \ -- add-port br-temp t1 \ -- set Interface t1 external_ids:iface-id=sw0-p2 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # hv1 ovn-controller should not bind sw0-p2. wait_for_ports_up sw0-p1 @@ -30340,7 +30340,7 @@ check_row_count Port_Binding 0 logical_port=sw0-p2 chassis=$c # Trigger recompute and sw0-p2 should not be claimed. as hv1 ovn-appctl -t ovn-controller recompute -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check_row_count Port_Binding 0 logical_port=sw0-p2 chassis=$ch @@ -30410,7 +30410,7 @@ AT_SKIP_IF([test $HAVE_SCAPY = no]) ovn_start net_add n1 -ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls1 # 2 HVs, each with 2 encap-ips. # lspXY is the Yth LSP on hvX, with encap-ip 192.168.0.XY. @@ -30506,7 +30506,7 @@ AT_SKIP_IF([test $HAVE_SCAPY = no]) ovn_start net_add n1 -ovn-nbctl lr-add lr +check ovn-nbctl lr-add lr # 2 HVs, each with 2 encap-ips, and each hosting a separate LS, connected by a LR. # lspXY is the Yth LSP on hvX, with encap-ip 192.168.0.XY, with ip 10.0.X.Y @@ -31465,22 +31465,22 @@ check ovn-nbctl lsp-add sw0 sw0-port6 check ovn-nbctl lsp-add sw0 sw0-port7 ovn-nbctl create address_set name=as1 -ovn-nbctl set address_set . addresses="10.0.0.10,10.0.0.11,10.0.0.12" +check ovn-nbctl set address_set . addresses="10.0.0.10,10.0.0.11,10.0.0.12" -ovn-nbctl pg-add pg1 sw0-port1 sw0-port2 sw0-port3 -ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4.dst == \$as1 && icmp4" drop -ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4.dst == \$as1 && tcp && tcp.dst >=10000 && tcp.dst <= 20000" drop -ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4.dst == \$as1 && udp && udp.dst >=10000 && udp.dst <= 20000" drop +check ovn-nbctl pg-add pg1 sw0-port1 sw0-port2 sw0-port3 +check ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4.dst == \$as1 && icmp4" drop +check ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4.dst == \$as1 && tcp && tcp.dst >=10000 && tcp.dst <= 20000" drop +check ovn-nbctl acl-add pg1 to-lport 1002 "outport == @pg1 && ip4.dst == \$as1 && udp && udp.dst >=10000 && udp.dst <= 20000" drop -ovn-nbctl pg-add pg2 sw0-port2 sw0-port3 sw0-port4 sw0-port5 -ovn-nbctl acl-add pg2 to-lport 1002 "outport == @pg2 && ip4.dst == \$as1 && icmp4" allow-related -ovn-nbctl acl-add pg2 to-lport 1002 "outport == @pg2 && ip4.dst == \$as1 && tcp && tcp.dst >=30000 && tcp.dst <= 40000" drop -ovn-nbctl acl-add pg2 to-lport 1002 "outport == @pg2 && ip4.dst == \$as1 && udp && udp.dst >=30000 && udp.dst <= 40000" drop +check ovn-nbctl pg-add pg2 sw0-port2 sw0-port3 sw0-port4 sw0-port5 +check ovn-nbctl acl-add pg2 to-lport 1002 "outport == @pg2 && ip4.dst == \$as1 && icmp4" allow-related +check ovn-nbctl acl-add pg2 to-lport 1002 "outport == @pg2 && ip4.dst == \$as1 && tcp && tcp.dst >=30000 && tcp.dst <= 40000" drop +check ovn-nbctl acl-add pg2 to-lport 1002 "outport == @pg2 && ip4.dst == \$as1 && udp && udp.dst >=30000 && udp.dst <= 40000" drop -ovn-nbctl pg-add pg3 sw0-port1 sw0-port5 -ovn-nbctl acl-add pg3 to-lport 1002 "outport == @pg3 && ip4.dst == \$as1 && icmp4" allow-related -ovn-nbctl acl-add pg3 to-lport 1002 "outport == @pg3 && ip4.dst == \$as1 && tcp && tcp.dst >=20000 && tcp.dst <= 30000" allow-related -ovn-nbctl acl-add pg3 to-lport 1002 "outport == @pg3 && ip4.dst == \$as1 && udp && udp.dst >=20000 && udp.dst <= 30000" allow-related +check ovn-nbctl pg-add pg3 sw0-port1 sw0-port5 +check ovn-nbctl acl-add pg3 to-lport 1002 "outport == @pg3 && ip4.dst == \$as1 && icmp4" allow-related +check ovn-nbctl acl-add pg3 to-lport 1002 "outport == @pg3 && ip4.dst == \$as1 && tcp && tcp.dst >=20000 && tcp.dst <= 30000" allow-related +check ovn-nbctl acl-add pg3 to-lport 1002 "outport == @pg3 && ip4.dst == \$as1 && udp && udp.dst >=20000 && udp.dst <= 30000" allow-related AS_BOX([Delete and add the port groups multiple times]) @@ -31570,7 +31570,7 @@ wait_for_ports_up sw0-p1 sw0-p2 # When the port group pg1 is updated, it should not result in # any assert in ovn-controller. -ovn-nbctl --wait=hv pg-set-ports pg1 sw0-p1 sw0-p2 sw0-p3 sw0-p4 +check ovn-nbctl --wait=hv pg-set-ports pg1 sw0-p1 sw0-p2 sw0-p3 sw0-p4 AT_CHECK([kill -0 $(cat hv1/ovn-controller.pid)]) check ovn-nbctl --wait=hv sync @@ -31664,7 +31664,7 @@ check ovn-nbctl lsp-add sw1 sw1-lr0 check ovn-nbctl lsp-set-type sw1-lr0 router check ovn-nbctl lsp-set-addresses sw1-lr0 router check ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync net_add n1 @@ -32115,7 +32115,7 @@ check as hv1 ovs-vsctl set Interface vm1 external_ids:iface-id=foo check ovn-nbctl lsp-del vm-cont check as hv1 ovn-appctl -t ovn-controller debug/resume -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Make sure that ovn-controller has not asserted. AT_CHECK([kill -0 $(cat hv1/ovn-controller.pid)]) @@ -32335,7 +32335,7 @@ check ovn-nbctl lsp-del vm-cont check as hv1 ovn-appctl -t ovn-controller debug/resume check as hv1 ovs-vsctl set Interface vm1 external_ids:iface-id=foo -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Make sure that ovn-controller has not asserted. AT_CHECK([kill -0 $(cat hv1/ovn-controller.pid)]) @@ -32766,7 +32766,7 @@ as hv1 ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 -ovn-nbctl lr-add lr0 +check ovn-nbctl lr-add lr0 for i in $(seq 0 9); do ovn-nbctl ls-add ls$i @@ -32783,10 +32783,10 @@ for i in $(seq 0 9); do done done -ovn-nbctl pg-add pg1 -ovn-nbctl pg-set-ports pg1 $(for i in 0 1 2 3 4 5 6 7 8 9; do for j in 0 1; do echo lsp${i}-${j}; done; done) +check ovn-nbctl pg-add pg1 +check ovn-nbctl pg-set-ports pg1 $(for i in 0 1 2 3 4 5 6 7 8 9; do for j in 0 1; do echo lsp${i}-${j}; done; done) -ovn-nbctl --type=port-group acl-add pg1 to-lport 100 "outport == @pg1 && ip4.src == \$pg1_ip4" allow +check ovn-nbctl --type=port-group acl-add pg1 to-lport 100 "outport == @pg1 && ip4.src == \$pg1_ip4" allow ovs-vsctl add-port br-int lsp0-0 -- set interface lsp0-0 external_ids:iface-id=lsp0-0 ovs-vsctl add-port br-int lsp0-1 -- set interface lsp0-1 external_ids:iface-id=lsp0-1 @@ -32935,19 +32935,19 @@ ovn_attach n1 br-phys 192.168.0.1 # Logical Router lr1 has Logical Switch sw1 (10.0.0.0/24) connected to it. sw1 has one # switch port sw1-ls1 (10.0.0.100) -ovn-nbctl lr-add lr1 +check ovn-nbctl lr-add lr1 -ovn-nbctl ls-add sw1 +check ovn-nbctl ls-add sw1 # Connect sw1 to lr1 -ovn-nbctl lrp-add lr1 lr1-sw1 00:00:01:01:02:03 10.0.0.1/24 -ovn-nbctl lsp-add sw1 sw1-lr1 -ovn-nbctl lsp-set-type sw1-lr1 router -ovn-nbctl lsp-set-addresses sw1-lr1 router -ovn-nbctl lsp-set-options sw1-lr1 router-port=lr1-sw1 +check ovn-nbctl lrp-add lr1 lr1-sw1 00:00:01:01:02:03 10.0.0.1/24 +check ovn-nbctl lsp-add sw1 sw1-lr1 +check ovn-nbctl lsp-set-type sw1-lr1 router +check ovn-nbctl lsp-set-addresses sw1-lr1 router +check ovn-nbctl lsp-set-options sw1-lr1 router-port=lr1-sw1 # Create logical port sw1-lp1 in sw1 -ovn-nbctl lsp-add sw1 sw1-lp1 \ +check ovn-nbctl lsp-add sw1 sw1-lp1 \ -- lsp-set-addresses sw1-lp1 "00:00:04:01:02:03 10.0.0.100" # Create one hypervisor and create OVS ports corresponding to logical ports. @@ -32959,10 +32959,10 @@ ovs-vsctl -- add-port br-int hv1-vif1 -- \ ofport-request=1 # Install static routes to drop traffic -ovn-nbctl lr-route-add lr1 20.0.0.0/24 discard +check ovn-nbctl lr-route-add lr1 20.0.0.0/24 discard # Allow some time for ovn-controller to catch up. -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Check logical flows for drop rule AT_CHECK([ovn-sbctl dump-flows | grep lr_in_ip_routing | grep -F "20.0.0.0/24" | \ @@ -32985,11 +32985,11 @@ AT_CHECK([ovs-ofctl dump-flows br-int | grep "nw_dst=20.0.0.0/24" | \ ]) # Remove destination match and add discard route with source match -ovn-nbctl lr-route-del lr1 20.0.0.0/24 -ovn-nbctl --policy="src-ip" lr-route-add lr1 10.0.0.0/24 discard +check ovn-nbctl lr-route-del lr1 20.0.0.0/24 +check ovn-nbctl --policy="src-ip" lr-route-add lr1 10.0.0.0/24 discard # Allow some time for ovn-controller to catch up. -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Check logical flows for drop rule AT_CHECK([ovn-sbctl dump-flows | grep lr_in_ip_routing | grep "10.0.0.0/24" | \ @@ -33024,38 +33024,38 @@ ovn_start # One LR - lr1 has switch ls1 (192.16.1.0/24) and ls2 (192.168.2.0/24) connected to it, # and and one HV with IP 192.16.1.6. -ovn-nbctl lr-add lr1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl lr-add lr1 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Connect ls1 to lr1 ls1_ro_mac=00:00:00:01:02:f1 ls1_ro_ip4=192.168.1.1 ls1_ro_ip6=fd11::1 -ovn-nbctl lrp-add lr1 ls1 $ls1_ro_mac $ls1_ro_ip4/24 $ls1_ro_ip6/64 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ +check ovn-nbctl lrp-add lr1 ls1 $ls1_ro_mac $ls1_ro_ip4/24 $ls1_ro_ip6/64 +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 \ type=router options:router-port=ls1 addresses=\"router\" # Create logical port ls1-lp1 in ls1 ls1_p1_mac=00:00:00:01:02:03 ls1_p1_ip4=192.16.1.6 ls1_p1_ip6=fd11::2 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "$ls1_p1_mac $ls1_p1_ip4 $ls1_p1_ip6" # Connect ls2 to lr1 ls2_ro_mac=00:00:00:01:02:f2 ls2_ro_ip4=192.168.2.1 ls2_ro_ip6=fd12::1 -ovn-nbctl lrp-add lr1 ls2 $ls2_ro_mac $ls2_ro_ip4/24 $ls2_ro_ip6/64 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ +check ovn-nbctl lrp-add lr1 ls2 $ls2_ro_mac $ls2_ro_ip4/24 $ls2_ro_ip6/64 +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 \ type=router options:router-port=ls1 addresses=\"router\" # Create logical port ls2-lp1 in ls2 ls2_p1_mac=00:00:00:01:02:04 ls2_p1_ip4=192.16.2.6 ls2_p1_ip6=fd12::2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "$ls2_p1_mac $ls2_p1_ip4 $ls2_p1_ip6" # Create one hypervisor and create OVS ports corresponding to logical ports. @@ -33181,13 +33181,13 @@ inport == "ls1"), action=(xreg0[[0..47]] = 00:00:00:01:02:f1; next;) # Remove and check that the flows have been removed -ovn-nbctl --wait=hv remove Logical_Switch_Port rp-ls1 \ +check ovn-nbctl --wait=hv remove Logical_Switch_Port rp-ls1 \ options arp_proxy="$arp_proxy_ls1_option" AT_CHECK([ovn-sbctl dump-flows | grep ls_in_arp_rsp | grep "${arp_proxy_ls1[[1]]}"], [1], [dnl ]) -ovn-nbctl --wait=hv remove Logical_Switch_Port rp-ls2 \ +check ovn-nbctl --wait=hv remove Logical_Switch_Port rp-ls2 \ options arp_proxy="$arp_proxy_ls2_option" AT_CHECK([ovn-sbctl dump-flows | grep ls_in_arp_rsp | @@ -33342,85 +33342,85 @@ ovn_start # HV4 - Gateway chassis gw3 # HV5 - North endpoint -ovn-nbctl lr-add DR -ovn-nbctl lrp-add DR DR-S1 02:ac:10:01:00:01 172.16.1.1/24 -ovn-nbctl lrp-add DR DR-S2 08:ac:10:01:00:01 10.0.0.1/24 -ovn-nbctl lrp-add DR DR-S3 04:ac:10:01:00:01 192.168.0.1/24 -ovn-nbctl lrp-add DR DR-ls 06:ac:10:01:00:01 20.0.0.1/24 - -ovn-nbctl ls-add S1 -ovn-nbctl lsp-add S1 S1-DR -ovn-nbctl lsp-set-type S1-DR router -ovn-nbctl lsp-set-addresses S1-DR router -ovn-nbctl --wait=sb lsp-set-options S1-DR router-port=DR-S1 -ovn-nbctl lsp-add S1 ln1 "" 1000 -ovn-nbctl lsp-set-addresses ln1 unknown -ovn-nbctl lsp-set-type ln1 localnet -ovn-nbctl lsp-set-options ln1 network_name=phys - -ovn-nbctl ls-add S2 -ovn-nbctl lsp-add S2 S2-DR -ovn-nbctl lsp-set-type S2-DR router -ovn-nbctl lsp-set-addresses S2-DR router -ovn-nbctl --wait=sb lsp-set-options S2-DR router-port=DR-S2 -ovn-nbctl lsp-add S2 ln2 "" 2000 -ovn-nbctl lsp-set-addresses ln2 unknown -ovn-nbctl lsp-set-type ln2 localnet -ovn-nbctl lsp-set-options ln2 network_name=phys - -ovn-nbctl ls-add S3 -ovn-nbctl lsp-add S3 S3-DR -ovn-nbctl lsp-set-type S3-DR router -ovn-nbctl lsp-set-addresses S3-DR router -ovn-nbctl --wait=sb lsp-set-options S3-DR router-port=DR-S3 -ovn-nbctl lsp-add S3 ln3 "" 3000 -ovn-nbctl lsp-set-addresses ln3 unknown -ovn-nbctl lsp-set-type ln3 localnet -ovn-nbctl lsp-set-options ln3 network_name=phys - -ovn-nbctl ls-add ls -ovn-nbctl lsp-add ls ls-DR -ovn-nbctl lsp-set-type ls-DR router -ovn-nbctl lsp-set-addresses ls-DR router -ovn-nbctl --wait=sb lsp-set-options ls-DR router-port=DR-ls +check ovn-nbctl lr-add DR +check ovn-nbctl lrp-add DR DR-S1 02:ac:10:01:00:01 172.16.1.1/24 +check ovn-nbctl lrp-add DR DR-S2 08:ac:10:01:00:01 10.0.0.1/24 +check ovn-nbctl lrp-add DR DR-S3 04:ac:10:01:00:01 192.168.0.1/24 +check ovn-nbctl lrp-add DR DR-ls 06:ac:10:01:00:01 20.0.0.1/24 + +check ovn-nbctl ls-add S1 +check ovn-nbctl lsp-add S1 S1-DR +check ovn-nbctl lsp-set-type S1-DR router +check ovn-nbctl lsp-set-addresses S1-DR router +check ovn-nbctl --wait=sb lsp-set-options S1-DR router-port=DR-S1 +check ovn-nbctl lsp-add S1 ln1 "" 1000 +check ovn-nbctl lsp-set-addresses ln1 unknown +check ovn-nbctl lsp-set-type ln1 localnet +check ovn-nbctl lsp-set-options ln1 network_name=phys + +check ovn-nbctl ls-add S2 +check ovn-nbctl lsp-add S2 S2-DR +check ovn-nbctl lsp-set-type S2-DR router +check ovn-nbctl lsp-set-addresses S2-DR router +check ovn-nbctl --wait=sb lsp-set-options S2-DR router-port=DR-S2 +check ovn-nbctl lsp-add S2 ln2 "" 2000 +check ovn-nbctl lsp-set-addresses ln2 unknown +check ovn-nbctl lsp-set-type ln2 localnet +check ovn-nbctl lsp-set-options ln2 network_name=phys + +check ovn-nbctl ls-add S3 +check ovn-nbctl lsp-add S3 S3-DR +check ovn-nbctl lsp-set-type S3-DR router +check ovn-nbctl lsp-set-addresses S3-DR router +check ovn-nbctl --wait=sb lsp-set-options S3-DR router-port=DR-S3 +check ovn-nbctl lsp-add S3 ln3 "" 3000 +check ovn-nbctl lsp-set-addresses ln3 unknown +check ovn-nbctl lsp-set-type ln3 localnet +check ovn-nbctl lsp-set-options ln3 network_name=phys + +check ovn-nbctl ls-add ls +check ovn-nbctl lsp-add ls ls-DR +check ovn-nbctl lsp-set-type ls-DR router +check ovn-nbctl lsp-set-addresses ls-DR router +check ovn-nbctl --wait=sb lsp-set-options ls-DR router-port=DR-ls # Add the lsp lp11 to ls. This will map to VIF11. -ovn-nbctl lsp-add ls lp11 -ovn-nbctl lsp-set-addresses lp11 "f0:00:00:00:00:10 20.0.0.10" -ovn-nbctl lsp-set-port-security lp11 f0:00:00:00:00:10 +check ovn-nbctl lsp-add ls lp11 +check ovn-nbctl lsp-set-addresses lp11 "f0:00:00:00:00:10 20.0.0.10" +check ovn-nbctl lsp-set-port-security lp11 f0:00:00:00:00:10 # Add the Northbound endpoint, lp-north1 -ovn-nbctl ls-add ls-north1 -ovn-nbctl lsp-add ls-north1 ln4 "" 1000 -ovn-nbctl lsp-set-addresses ln4 unknown -ovn-nbctl lsp-set-type ln4 localnet -ovn-nbctl lsp-set-options ln4 network_name=phys +check ovn-nbctl ls-add ls-north1 +check ovn-nbctl lsp-add ls-north1 ln4 "" 1000 +check ovn-nbctl lsp-set-addresses ln4 unknown +check ovn-nbctl lsp-set-type ln4 localnet +check ovn-nbctl lsp-set-options ln4 network_name=phys -ovn-nbctl lsp-add ls-north1 lp-north1 -ovn-nbctl lsp-set-addresses lp-north1 "f0:f0:00:00:00:11 172.16.1.10" -ovn-nbctl lsp-set-port-security lp-north1 f0:f0:00:00:00:11 +check ovn-nbctl lsp-add ls-north1 lp-north1 +check ovn-nbctl lsp-set-addresses lp-north1 "f0:f0:00:00:00:11 172.16.1.10" +check ovn-nbctl lsp-set-port-security lp-north1 f0:f0:00:00:00:11 # Add the Northbound endpoint, lp-north2 -ovn-nbctl ls-add ls-north2 -ovn-nbctl lsp-add ls-north2 ln5 "" 2000 -ovn-nbctl lsp-set-addresses ln5 unknown -ovn-nbctl lsp-set-type ln5 localnet -ovn-nbctl lsp-set-options ln5 network_name=phys +check ovn-nbctl ls-add ls-north2 +check ovn-nbctl lsp-add ls-north2 ln5 "" 2000 +check ovn-nbctl lsp-set-addresses ln5 unknown +check ovn-nbctl lsp-set-type ln5 localnet +check ovn-nbctl lsp-set-options ln5 network_name=phys -ovn-nbctl lsp-add ls-north2 lp-north2 -ovn-nbctl lsp-set-addresses lp-north2 "f0:f0:00:00:00:22 10.0.0.10" -ovn-nbctl lsp-set-port-security lp-north2 f0:f0:00:00:00:22 +check ovn-nbctl lsp-add ls-north2 lp-north2 +check ovn-nbctl lsp-set-addresses lp-north2 "f0:f0:00:00:00:22 10.0.0.10" +check ovn-nbctl lsp-set-port-security lp-north2 f0:f0:00:00:00:22 # Add the Northbound endpoint, lp-north3 -ovn-nbctl ls-add ls-north3 -ovn-nbctl lsp-add ls-north3 ln6 "" 3000 -ovn-nbctl lsp-set-addresses ln6 unknown -ovn-nbctl lsp-set-type ln6 localnet -ovn-nbctl lsp-set-options ln6 network_name=phys +check ovn-nbctl ls-add ls-north3 +check ovn-nbctl lsp-add ls-north3 ln6 "" 3000 +check ovn-nbctl lsp-set-addresses ln6 unknown +check ovn-nbctl lsp-set-type ln6 localnet +check ovn-nbctl lsp-set-options ln6 network_name=phys -ovn-nbctl lsp-add ls-north3 lp-north3 -ovn-nbctl lsp-set-addresses lp-north3 "f0:f0:00:00:00:33 192.168.0.10" -ovn-nbctl lsp-set-port-security lp-north3 f0:f0:00:00:00:33 +check ovn-nbctl lsp-add ls-north3 lp-north3 +check ovn-nbctl lsp-set-addresses lp-north3 "f0:f0:00:00:00:33 192.168.0.10" +check ovn-nbctl lsp-set-port-security lp-north3 f0:f0:00:00:00:33 # Add 5 chassis net_add n1 @@ -33458,11 +33458,11 @@ as hv5 ovs-vsctl add-port br-int vif-north3 -- \ options:rxq_pcap=hv5/vif-north3-rx.pcap \ ofport-request=46 -ovn-nbctl lrp-set-gateway-chassis DR-S1 hv2 -ovn-nbctl lrp-set-gateway-chassis DR-S2 hv3 -ovn-nbctl lrp-set-gateway-chassis DR-S3 hv4 +check ovn-nbctl lrp-set-gateway-chassis DR-S1 hv2 +check ovn-nbctl lrp-set-gateway-chassis DR-S2 hv3 +check ovn-nbctl lrp-set-gateway-chassis DR-S3 hv4 -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync OVN_POPULATE_ARP vif_to_ls () { case ${1} in dnl ( @@ -33698,7 +33698,7 @@ AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=$arp_rsp | grep -F 10.0.1.2], # doesn't remove.) check ovn-nbctl --wait=hv lrp-set-gateway-chassis lrp_lr_ls1 hv1 1 as hv2 check ovn-appctl -t ovn-controller recompute -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=$arp_rsp | grep -F 10.0.1.2], [1]) # Enable dnat_and_snat on lr, and now hv2 should see flows for lsp1. @@ -33722,14 +33722,14 @@ ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 ovs-vsctl -- add-port br-int hv1-vm1 -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-port1 -ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.3" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-port1 +check ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.3" -ovn-nbctl lsp-set-options sw0-port1 iface-id-ver=foo +check ovn-nbctl lsp-set-options sw0-port1 iface-id-ver=foo -ovn-nbctl lsp-add sw0 sw0-port2 -ovn-nbctl --wait=hv lsp-set-addresses sw0-port2 "50:54:00:00:00:02 10.0.0.4" +check ovn-nbctl lsp-add sw0 sw0-port2 +check ovn-nbctl --wait=hv lsp-set-addresses sw0-port2 "50:54:00:00:00:02 10.0.0.4" hv1_uuid=$(fetch_column Chassis _uuid name=hv1) hv2_uuid=$(fetch_column Chassis _uuid name=hv2) @@ -33738,7 +33738,7 @@ check as hv1 ovs-vsctl add-port br-int vif11 \ -- set interface vif11 external_ids:iface-id=sw0-port1 # sw0-port1 should not be claimed. -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check_column "" Port_Binding chassis logical_port=sw0-port1 AT_CHECK([as hv1 ovn-appctl -t ovn-controller debug/dump-local-bindings], [0], [dnl @@ -33763,7 +33763,7 @@ primary lport : [[sw0-port1]] # Clear the iface-id-ver from vif11 and hv1 ovn-controller should release it. check as hv1 ovs-vsctl remove interface vif11 external_ids iface-id-ver -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check_column "" Port_Binding chassis logical_port=sw0-port1 AT_CHECK([as hv1 ovn-appctl -t ovn-controller debug/dump-local-bindings], [0], [dnl @@ -33787,7 +33787,7 @@ primary lport : [[sw0-port1]] # Set the options:iface-id-ver to sw0-port1 with different value. check ovn-nbctl lsp-set-options sw0-port1 iface-id-ver=bar -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check_column "" Port_Binding chassis logical_port=sw0-port1 AT_CHECK([as hv1 ovn-appctl -t ovn-controller debug/dump-local-bindings], [0], [dnl @@ -33810,7 +33810,7 @@ primary lport : [[sw0-port1]] # Set a different iface-id-ver on vif11. check as hv1 ovs-vsctl set interface vif11 external_ids:iface-id-ver=bar2 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check_column "" Port_Binding chassis logical_port=sw0-port1 AT_CHECK([as hv1 ovn-appctl -t ovn-controller debug/dump-local-bindings], [0], [dnl @@ -33823,7 +33823,7 @@ name: [[sw0-port1]], OVS interface name : [[vif11]], num binding lports : [[0]] # So sw0-port1 should be internally claimed without setting sw0-port1 to up. check ovn-nbctl lsp-set-type sw0-port1 localport -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check_column "" Port_Binding chassis logical_port=sw0-port1 AT_CHECK([as hv1 ovn-appctl -t ovn-controller debug/dump-local-bindings], [0], [dnl @@ -33866,19 +33866,19 @@ ovn_attach n1 br-phys 192.168.0.1 check as hv1 ovs-vsctl add-port br-int vif11 \ -- set interface vif11 external_ids:iface-id=sw0-port1 -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-port1 -ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.3" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-port1 +check ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:01 10.0.0.3" check ovn-nbctl lsp-add sw0 sw0-port2 check ovn-nbctl lsp-set-addresses sw0-port2 "50:54:00:00:00:01 10.0.0.4" check ovn-nbctl lsp-set-type sw0-port2 localport -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 -ovn-nbctl lsp-add sw0 sw0-lr0 -ovn-nbctl lsp-set-type sw0-lr0 router -ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:ff:01 -ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:00:00:ff:01 10.0.0.1/24 +check ovn-nbctl lsp-add sw0 sw0-lr0 +check ovn-nbctl lsp-set-type sw0-lr0 router +check ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:ff:01 +check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 wait_for_ports_up sw0-port1 @@ -33889,7 +33889,7 @@ grep sw0-port1 -c], [0], [1 check as hv1 ovs-vsctl add-port br-int vif13 \ -- set interface vif13 external_ids:iface-id=sw0-port2 ofport-request=13 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync OVS_WAIT_UNTIL([test `ovs-ofctl dump-flows br-int table=OFTABLE_PHY_TO_LOG | grep "in_port=13" | wc -l` -eq 1]) # There should be ct zone for sw0-port2 (localport). @@ -33907,8 +33907,8 @@ grep lr0-sw0], [1], []) check as hv1 ovs-vsctl add-port br-int vif12 \ -- set interface vif12 external_ids:iface-id=sw1-port1 -ovn-nbctl ls-add sw1 -ovn-nbctl lsp-add sw1 sw1-port1 +check ovn-nbctl ls-add sw1 +check ovn-nbctl lsp-add sw1 sw1-port1 wait_for_ports_up sw1-port1 AT_CHECK([as hv1 ovn-appctl -t ovn-controller ct-zone-list | \ @@ -33916,16 +33916,16 @@ grep sw1-port1 -c], [0], [1 ]) # Attach sw1 to lr0 -ovn-nbctl lsp-add sw1 sw1-lr0 -ovn-nbctl lsp-set-type sw1-lr0 router -ovn-nbctl lsp-set-addresses sw1-lr0 00:00:00:00:ff:02 -ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 +check ovn-nbctl lsp-add sw1 sw1-lr0 +check ovn-nbctl lsp-set-type sw1-lr0 router +check ovn-nbctl lsp-set-addresses sw1-lr0 00:00:00:00:ff:02 +check ovn-nbctl lsp-set-options sw1-lr0 router-port=lr0-sw1 # There should be no ct-zone id allocated for sw1-lr0 AT_CHECK([as hv1 ovn-appctl -t ovn-controller ct-zone-list | \ grep sw1-lr0], [1], []) -ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 +check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:00:00:ff:02 20.0.0.1/24 # There should be no ct-zone id allocated for lr0-sw1 AT_CHECK([as hv1 ovn-appctl -t ovn-controller ct-zone-list | \ @@ -34207,8 +34207,8 @@ wait_row_count Port_Binding 1 logical_port=lsp chassis=$ch check ovn-nbctl --event lb-add lb0 192.168.1.100:80 "" check ovn-nbctl ls-lb-add sw0 lb0 check ovn-nbctl meter-add meter0 drop 10 pktps -ovn-nbctl --wait=hv copp-add copp0 event-elb meter0 -ovn-nbctl --wait=hv ls-copp-add copp0 sw0 +check ovn-nbctl --wait=hv copp-add copp0 event-elb meter0 +check ovn-nbctl --wait=hv ls-copp-add copp0 sw0 check ovn-nbctl --wait=hv sync AT_CHECK([as hv1 ovs-ofctl -OOpenFlow15 dump-meters br-int | grep -q rate=10], [0]) @@ -34270,32 +34270,32 @@ ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys ovn_attach n1 br-phys 192.168.0.1 # Create a logical router -ovn-nbctl lr-add lr0 -ovn-nbctl lrp-add lr0 lr0-ls0 00:00:11:11:22:22 20.0.0.1/24 -ovn-nbctl lrp-add lr0 lr0-ext-ls0 00:00:11:11:33:33 172.16.1.10/24 +check ovn-nbctl lr-add lr0 +check ovn-nbctl lrp-add lr0 lr0-ls0 00:00:11:11:22:22 20.0.0.1/24 +check ovn-nbctl lrp-add lr0 lr0-ext-ls0 00:00:11:11:33:33 172.16.1.10/24 # Create logical switch and connect to logical router -ovn-nbctl ls-add ls0 -ovn-nbctl lsp-add ls0 ls0-lr0 -ovn-nbctl lsp-set-type ls0-lr0 router -ovn-nbctl lsp-set-addresses ls0-lr0 router -ovn-nbctl --wait=sb lsp-set-options ls0-lr0 router-port=lr0-ls0 +check ovn-nbctl ls-add ls0 +check ovn-nbctl lsp-add ls0 ls0-lr0 +check ovn-nbctl lsp-set-type ls0-lr0 router +check ovn-nbctl lsp-set-addresses ls0-lr0 router +check ovn-nbctl --wait=sb lsp-set-options ls0-lr0 router-port=lr0-ls0 # Create external gateway switch and connect to logical router -ovn-nbctl ls-add ext-ls0 -ovn-nbctl lsp-add ext-ls0 ext-ls0-lr0 -ovn-nbctl lsp-set-type ext-ls0-lr0 router -ovn-nbctl lsp-set-addresses ext-ls0-lr0 router -ovn-nbctl --wait=sb lsp-set-options ext-ls0-lr0 router-port=lr0-ext-ls0 +check ovn-nbctl ls-add ext-ls0 +check ovn-nbctl lsp-add ext-ls0 ext-ls0-lr0 +check ovn-nbctl lsp-set-type ext-ls0-lr0 router +check ovn-nbctl lsp-set-addresses ext-ls0-lr0 router +check ovn-nbctl --wait=sb lsp-set-options ext-ls0-lr0 router-port=lr0-ext-ls0 -ovn-nbctl lsp-add ext-ls0 ln0 "" 1000 -ovn-nbctl lsp-set-addresses ln0 unknown -ovn-nbctl lsp-set-type ln0 localnet -ovn-nbctl lsp-set-options ln0 network_name=phys +check ovn-nbctl lsp-add ext-ls0 ln0 "" 1000 +check ovn-nbctl lsp-set-addresses ln0 unknown +check ovn-nbctl lsp-set-type ln0 localnet +check ovn-nbctl lsp-set-options ln0 network_name=phys # Add the lsp lp11 to ls0. This will map to VIF11. -ovn-nbctl lsp-add ls0 lp11 -ovn-nbctl lsp-set-addresses lp11 "00:00:11:11:44:44 20.0.0.10" +check ovn-nbctl lsp-add ls0 lp11 +check ovn-nbctl lsp-set-addresses lp11 "00:00:11:11:44:44 20.0.0.10" # Add a vif on HV1 ovs-vsctl add-port br-int vif11 -- \ @@ -34305,13 +34305,13 @@ ovs-vsctl add-port br-int vif11 -- \ ofport-request=11 OVS_WAIT_UNTIL([test x$(ovn-nbctl lsp-get-up lp11) = xup]) -ovn-nbctl lrp-set-gateway-chassis lr0-ext-ls0 hv1 +check ovn-nbctl lrp-set-gateway-chassis lr0-ext-ls0 hv1 -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync OVN_POPULATE_ARP -ovn-nbctl --wait=hv lr-nat-add lr0 snat 172.16.1.10 20.0.0.0/24 -ovn-nbctl --wait=hv lr-route-add lr0 0.0.0.0/0 172.16.1.1 +check ovn-nbctl --wait=hv lr-nat-add lr0 snat 172.16.1.10 20.0.0.0/24 +check ovn-nbctl --wait=hv lr-route-add lr0 0.0.0.0/0 172.16.1.1 test_mac_binding_flows() { local priority=$1 mac=$2 count=$3 @@ -34325,23 +34325,23 @@ test_mac_binding_flows 100 00:00:11:22:33:44 1 # Create Static_MAC_Binding entry on external gateway port. This should have # higher priority than MAC_Binding entry -ovn-nbctl static-mac-binding-add lr0-ext-ls0 172.16.1.1 00:00:11:22:33:66 +check ovn-nbctl static-mac-binding-add lr0-ext-ls0 172.16.1.1 00:00:11:22:33:66 test_mac_binding_flows 50 00:00:11:22:33:66 1 # Update MAC for existing Static_MAC_Binding. Existing flow should be updated. -ovn-nbctl --may-exist static-mac-binding-add lr0-ext-ls0 172.16.1.1 00:00:11:22:33:88 +check ovn-nbctl --may-exist static-mac-binding-add lr0-ext-ls0 172.16.1.1 00:00:11:22:33:88 test_mac_binding_flows 50 00:00:11:22:33:66 0 test_mac_binding_flows 50 00:00:11:22:33:88 1 # Update override_dynamic_mac for existing Static_MAC_Binding. Existing flow should be updated. smb_uuid=$(fetch_column nb:static_mac_binding _uuid ip=172.16.1.1) -ovn-nbctl set static_mac_binding $smb_uuid override_dynamic_mac=true +check ovn-nbctl set static_mac_binding $smb_uuid override_dynamic_mac=true test_mac_binding_flows 50 00:00:11:22:33:88 0 test_mac_binding_flows 150 00:00:11:22:33:88 1 # Delete Static_MAC_Binding. Higher priority flow should get deleted. -ovn-nbctl static-mac-binding-del lr0-ext-ls0 172.16.1.1 +check ovn-nbctl static-mac-binding-del lr0-ext-ls0 172.16.1.1 test_mac_binding_flows 150 00:00:11:22:33:88 0 OVN_CLEANUP([hv1]) @@ -35434,27 +35434,27 @@ ovs-vsctl -- add-port br-int hv2-vif2 -- \ options:rxq_pcap=hv2/vif2-rx.pcap ovn-nbctl create Logical_Router name=lr0 -ovn-nbctl ls-add sw0 -ovn-nbctl ls-add sw1 +check ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw1 -ovn-nbctl lrp-add lr0 lr0-sw0 00:00:01:01:02:03 192.168.1.1/24 -ovn-nbctl lsp-add sw0 sw0-lr0 -- set Logical_Switch_Port sw0-lr0 \ +check ovn-nbctl lrp-add lr0 lr0-sw0 00:00:01:01:02:03 192.168.1.1/24 +check ovn-nbctl lsp-add sw0 sw0-lr0 -- set Logical_Switch_Port sw0-lr0 \ type=router options:router-port=lr0-sw0 \ -- lsp-set-addresses sw0-lr0 router -ovn-nbctl lrp-add lr0 lr0-sw1 00:00:02:01:02:03 172.16.1.1/24 \ +check ovn-nbctl lrp-add lr0 lr0-sw1 00:00:02:01:02:03 172.16.1.1/24 \ -- lrp-set-gateway-chassis lr0-sw1 hv2 -ovn-nbctl lsp-add sw1 sw1-lr0 -- set Logical_Switch_Port sw1-lr0 \ +check ovn-nbctl lsp-add sw1 sw1-lr0 -- set Logical_Switch_Port sw1-lr0 \ type=router options:router-port=lr0-sw1 \ -- lsp-set-addresses sw1-lr0 router -ovn-nbctl lsp-add sw0 sw0-p0 \ +check ovn-nbctl lsp-add sw0 sw0-p0 \ -- lsp-set-addresses sw0-p0 "f0:00:00:01:02:03 192.168.1.2" -ovn-nbctl lsp-add sw0 sw0-p1 \ +check ovn-nbctl lsp-add sw0 sw0-p1 \ -- lsp-set-addresses sw0-p1 "f0:00:00:11:02:03 192.168.1.3" -ovn-nbctl --wait=hv lsp-add sw1 sw1-p0 \ +check ovn-nbctl --wait=hv lsp-add sw1 sw1-p0 \ -- lsp-set-addresses sw1-p0 unknown check ovn-nbctl --wait=hv lsp-del sw1-lr0 @@ -35476,9 +35476,9 @@ ovn_attach n1 br-phys 192.168.0.1 check ovs-vsctl add-port br-int p0 check ovs-vsctl add-port br-int p1 -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-port0 -- lsp-set-addresses sw0-port0 "50:54:00:00:00:01 192.168.0.2" -ovn-nbctl lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:02 192.168.0.3" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-port0 -- lsp-set-addresses sw0-port0 "50:54:00:00:00:01 192.168.0.2" +check ovn-nbctl lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:02 192.168.0.3" check ovn-nbctl --wait=hv sync # Pause SB @@ -35490,12 +35490,12 @@ sleep 0.5 # Make us claim sw0-port1. Claim should be delayed ovs-vsctl set interface p1 external-ids:iface-id=sw0-port1 # Delete sw0-port1 -ovn-nbctl lsp-del sw0-port1 +check ovn-nbctl lsp-del sw0-port1 sleep 0.5 # Restart SB AT_CHECK([kill -CONT $(cat ovn-sb/ovsdb-server.pid)]) check ovn-nbctl --wait=hv sync -ovn-nbctl ls-del sw0 +check ovn-nbctl ls-del sw0 check ovn-nbctl --wait=hv sync OVN_CLEANUP([hv1]) AT_CLEANUP @@ -35513,10 +35513,10 @@ ovn_attach n1 br-phys 192.168.0.1 check ovs-vsctl add-port br-int p0 check ovs-vsctl add-port br-int p1 -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-port0 -- lsp-set-addresses sw0-port0 "50:54:00:00:00:01 192.168.0.2" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-port0 -- lsp-set-addresses sw0-port0 "50:54:00:00:00:01 192.168.0.2" check ovn-nbctl --wait=hv sync -ovn-nbctl lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:02 192.168.0.3" +check ovn-nbctl lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:02 192.168.0.3" ovs-vsctl set interface p0 external-ids:iface-id=sw0-port0 ovs-vsctl set interface p1 external-ids:iface-id=sw0-port1 check ovn-nbctl --wait=hv sync @@ -35524,15 +35524,15 @@ as hv1 ovs-ofctl dump-flows br-int | sed 's/cookie=0x.*, duration=.*, table/coo ovs-vsctl set interface p0 external-ids:iface-id=foo0 ovs-vsctl set interface p1 external-ids:iface-id=foo1 -ovn-nbctl lsp-del sw0-port0 -ovn-nbctl lsp-del sw0-port1 -ovn-nbctl ls-del sw0 +check ovn-nbctl lsp-del sw0-port0 +check ovn-nbctl lsp-del sw0-port1 +check ovn-nbctl ls-del sw0 check ovn-nbctl --wait=hv sync -ovn-nbctl ls-add sw0 -ovn-nbctl lsp-add sw0 sw0-port0 -- lsp-set-addresses sw0-port0 "50:54:00:00:00:01 192.168.0.2" +check ovn-nbctl ls-add sw0 +check ovn-nbctl lsp-add sw0 sw0-port0 -- lsp-set-addresses sw0-port0 "50:54:00:00:00:01 192.168.0.2" check ovn-nbctl --wait=hv sync -ovn-nbctl lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:02 192.168.0.3" +check ovn-nbctl lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:02 192.168.0.3" check ovn-nbctl --wait=hv sync # Pause SB @@ -35550,7 +35550,7 @@ check ovn-nbctl --wait=hv sync as hv1 ovs-ofctl dump-flows br-int | sed 's/cookie=0x.*, duration=.*, table/cookie=??, duration=??, table/' | sed 's/load:0x.->NXM_NX_REG1/load:0x?->NXM_NX_REG1/g' | sed 's/idle_age=[[0-9]], //g' | sort > offlows2 AT_CHECK([diff offlows1 offlows2]) -ovn-nbctl ls-del sw0 +check ovn-nbctl ls-del sw0 check ovn-nbctl --wait=hv sync OVN_CLEANUP([hv1]) AT_CLEANUP @@ -35880,28 +35880,28 @@ ls2_lp1_mac="f0:00:00:01:02:04" ls1_lp1_ip="192.168.1.2" ls2_lp1_ip="172.16.1.2" -ovn-nbctl lr-add R1 -ovn-nbctl ls-add ls1 -ovn-nbctl ls-add ls2 +check ovn-nbctl lr-add R1 +check ovn-nbctl ls-add ls1 +check ovn-nbctl ls-add ls2 # Connect ls1 to R1 -ovn-nbctl lrp-add R1 ls1 $rp_ls1_mac 192.168.1.1/24 +check ovn-nbctl lrp-add R1 ls1 $rp_ls1_mac 192.168.1.1/24 -ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ +check ovn-nbctl lsp-add ls1 rp-ls1 -- set Logical_Switch_Port rp-ls1 type=router \ options:router-port=ls1 addresses=\"$rp_ls1_mac\" # Connect ls2 to R1 -ovn-nbctl lrp-add R1 ls2 $rp_ls2_mac 172.16.1.1/24 +check ovn-nbctl lrp-add R1 ls2 $rp_ls2_mac 172.16.1.1/24 -ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ +check ovn-nbctl lsp-add ls2 rp-ls2 -- set Logical_Switch_Port rp-ls2 type=router \ options:router-port=ls2 addresses=\"$rp_ls2_mac\" # Create logical port ls1-lp1 in ls1 -ovn-nbctl lsp-add ls1 ls1-lp1 \ +check ovn-nbctl lsp-add ls1 ls1-lp1 \ -- lsp-set-addresses ls1-lp1 "$ls1_lp1_mac $ls1_lp1_ip" # Create logical port ls2-lp1 in ls2 -ovn-nbctl lsp-add ls2 ls2-lp1 \ +check ovn-nbctl lsp-add ls2 ls2-lp1 \ -- lsp-set-addresses ls2-lp1 "$ls2_lp1_mac $ls2_lp1_ip" # Create two hypervisor and create OVS ports corresponding to logical ports. @@ -36020,7 +36020,7 @@ check ovs-vsctl add-port br-int p1 -- set interface p1 external_ids:iface-id=lsp check ovs-vsctl add-port br-int p2 -- set interface p2 external_ids:iface-id=lsp2 wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # Get the OF table numbers acl_eval=$(ovn-debug lflow-stage-to-oftable ls_in_acl_eval) @@ -36111,7 +36111,7 @@ check ovs-vsctl add-port br-int p1 -- set interface p1 external_ids:iface-id=lsp check ovs-vsctl add-port br-int p2 -- set interface p2 external_ids:iface-id=lsp2 wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync dnl Ensure the LBs are not translated to OpenFlow. as hv1 @@ -36410,13 +36410,13 @@ ovn_attach n1 br-phys1 192.168.0.1 # use a port as a canary in the mine to wait until the controller is up # (meaning, ssl configuration was read from the database) -ovn-nbctl ls-add ls -ovn-nbctl lsp-add ls lp -ovn-nbctl lsp-set-options lp requested-chassis=hv1 +check ovn-nbctl ls-add ls +check ovn-nbctl lsp-add ls lp +check ovn-nbctl lsp-set-options lp requested-chassis=hv1 ovs-vsctl -- add-port br-int vif -- \ set interface vif external-ids:iface-id=lp wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # the file is read once at startup so it's safe to write it # here after the first ovn-controller has started @@ -36436,12 +36436,12 @@ start_virtual_controller n1 br-phys2 br-int-2 192.168.0.2 24 geneve,vxlan hv2 \ pidfile="$OVS_RUNDIR"/ovn-controller-2.pid on_exit "test -e \"$pidfile\" && kill \`cat \"$pidfile\"\`" -ovn-nbctl lsp-add ls lp2 -ovn-nbctl lsp-set-options lp2 requested-chassis=hv2 +check ovn-nbctl lsp-add ls lp2 +check ovn-nbctl lsp-set-options lp2 requested-chassis=hv2 ovs-vsctl -- add-port br-int-2 vif2 -- \ set interface vif2 external-ids:iface-id=lp2 wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # check that both tunnel ports are present, meaning controllers # don't step on each other @@ -36639,13 +36639,13 @@ ovn_attach n1 br-phys-1 192.168.1.1 24 check ovn-nbctl \ ls-add ls \ -- add Logical_Switch ls other_config vlan-passthru=true -ovn-nbctl lsp-add ls lp1 -ovn-nbctl lsp-set-addresses lp1 "00:00:00:00:00:01 10.0.0.1" +check ovn-nbctl lsp-add ls lp1 +check ovn-nbctl lsp-set-addresses lp1 "00:00:00:00:00:01 10.0.0.1" -ovn-nbctl lsp-add ls ln_port -ovn-nbctl lsp-set-addresses ln_port unknown -ovn-nbctl lsp-set-type ln_port localnet -ovn-nbctl lsp-set-options ln_port network_name=phys +check ovn-nbctl lsp-add ls ln_port +check ovn-nbctl lsp-set-addresses ln_port unknown +check ovn-nbctl lsp-set-type ln_port localnet +check ovn-nbctl lsp-set-options ln_port network_name=phys ovs-vsctl -- add-port br-int vif1 -- \ set interface vif1 external-ids:iface-id=lp1 \ @@ -36673,14 +36673,14 @@ send_arp() { } wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync # now start the second virtual controller ovs-vsctl add-br br-phys-2 ovs-vsctl set open . external-ids:ovn-bridge-mappings-hv2=phys:br-phys-2 -ovn-nbctl lsp-add ls lp2 -ovn-nbctl lsp-set-addresses lp2 "00:00:00:00:00:02 10.0.0.2" +check ovn-nbctl lsp-add ls lp2 +check ovn-nbctl lsp-set-addresses lp2 "00:00:00:00:00:02 10.0.0.2" # the file is read once at startup so it's safe to write it # here after the first ovn-controller has started @@ -36705,7 +36705,7 @@ ovs-vsctl -- add-port br-int-2 vif2 -- \ options:rxq_pcap=hv1/vif2-rx.pcap wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync OVN_POPULATE_ARP @@ -36741,7 +36741,7 @@ check ovn-nbctl lsp-add sw lsp1 check ovs-vsctl add-port br-int p1 -- set interface p1 external_ids:iface-id=lsp1 wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check ovn-nbctl lb-add lb1 "192.168.0.10" "192.168.10.10,192.168.10.20" \ -- set load_balancer lb1 options:ct_flush="true" @@ -36944,7 +36944,7 @@ start_virtual_controller n1 br-phys-2 br-int-2 192.168.0.2 24 geneve,vxlan hv2 \ pidfile="$OVS_RUNDIR"/ovn-controller-2.pid on_exit "test -e \"$pidfile\" && kill \`cat \"$pidfile\"\`" -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync check_tunnel_port() { local hv=$1 @@ -37451,7 +37451,7 @@ check ovn-nbctl --wait=sb lsp-del lsp1 wake_up_controller hv-1 # Make sure ovn-controller is still OK -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync OVS_WAIT_UNTIL([test $(as hv-1 ovs-vsctl list qos | grep -c linux-htb) -eq 1]) OVN_CLEANUP([hv-1],[hv-2]) AT_CLEANUP @@ -37585,7 +37585,7 @@ check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 check ovn-appctl -t ovn-controller vlog/set dbg:ct_zone wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync get_zone_num () { output=$1 @@ -37807,7 +37807,7 @@ ovs-vsctl -- add-port br-int hv1-vif3 -- \ ovs-appctl -t ovn-controller vlog/set dbg -ovn-nbctl ls-add sw0 +check ovn-nbctl ls-add sw0 check ovn-nbctl lsp-add sw0 sw0-vir check ovn-nbctl lsp-set-addresses sw0-vir "50:54:00:00:00:10 10.0.0.10" @@ -37829,7 +37829,7 @@ check ovn-nbctl lsp-set-addresses sw0-lr0 00:00:00:00:ff:01 check ovn-nbctl lsp-set-options sw0-lr0 router-port=lr0-sw0 wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync hv1_ch_uuid=`ovn-sbctl --bare --columns _uuid find chassis name="hv1"` # Try to bind sw0-vir directly to an OVS port. This should be ignored by @@ -37856,7 +37856,7 @@ sleep_controller hv1 as hv1 ovs-vsctl del-port hv1-vif3 wake_up_sb -ovn-nbctl --wait=sb sync +check ovn-nbctl --wait=sb sync wake_up_controller hv1 check ovn-nbctl --wait=hv sync @@ -38685,7 +38685,7 @@ check ovn-nbctl set Logical_Switch_Port lsp1 \ as hv2 check ovs-vsctl set Interface vif1 external-ids:iface-id=lsp1 -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync wait_for_ports_up lsp1 wait_for_ports_up sw0-port1.1 @@ -39085,12 +39085,12 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([Delete parent of container port]) ovn_start -ovn-nbctl ls-add ls0 -ovn-nbctl lsp-add ls0 lsp0 +check ovn-nbctl ls-add ls0 +check ovn-nbctl lsp-add ls0 lsp0 # Add a second logical port, so that deleting lsp0 does not result in deleting # the last port of the datapath. -ovn-nbctl lsp-add ls0 lsp1 +check ovn-nbctl lsp-add ls0 lsp1 check ovn-nbctl lsp-add ls0 lsp-cont1 lsp0 1 @@ -39119,9 +39119,9 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([Deleting vif while controller fight for port claim]) ovn_start -ovn-nbctl ls-add ls0 -ovn-nbctl lsp-add ls0 lsp0 -ovn-nbctl lsp-add ls0 lsp1 +check ovn-nbctl ls-add ls0 +check ovn-nbctl lsp-add ls0 lsp0 +check ovn-nbctl lsp-add ls0 lsp1 net_add n1 for i in 1 2; do @@ -39378,7 +39378,7 @@ for hv in hv1 hv2; do done wait_for_ports_up -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync OVS_WAIT_UNTIL([test $(as hv2 ovs-ofctl dump-flows br-int table=OFTABLE_OUTPUT_LARGE_PKT_DETECT | grep -c check_pkt_larger) -eq 0]) @@ -39707,7 +39707,7 @@ check_patch_ports \ # ovn-controller should delete the patch ports now as we are setting # OVN as its owner. check ovs-vsctl set port patch-br-int-to-br-eth0 external_ids:ovn-localnet-port=foo -ovn-nbctl --wait=hv sync +check ovn-nbctl --wait=hv sync AS_BOX([Checking for patch ports after setting external_ids:ovn-localnet-port to the manually created patch port]) check_patch_ports