curl -v output changes between versions e.g. in Fedora 44 "Connected to" is replaced by "Established connection to 172.16.0.100 (172.16.0.100 port 80) ..."
While at it, fixed curl output checked on wrong chassis (curl run on ovn-chassis-3 and output checked on ovn-chassis-4). This caused following test to fail when multinode test was built with Fedora 44 "ovn multinode load-balancer with multiple DGPs and multiple chassis". Signed-off-by: Xavier Simonart <[email protected]> --- tests/multinode-macros.at | 7 +++ tests/multinode.at | 101 +++++++++++++++++++++----------------- 2 files changed, 62 insertions(+), 46 deletions(-) diff --git a/tests/multinode-macros.at b/tests/multinode-macros.at index 88677e364..8e730618f 100644 --- a/tests/multinode-macros.at +++ b/tests/multinode-macros.at @@ -82,6 +82,13 @@ m4_define([M_FORMAT_CT], m4_define([M_FORMAT_CURL], [[sed 's/\(.*\)Connected to $1 ($1) port $2/Connected to $1 ($1) port $2\n/' | sed 's/\(.*\)200 OK/200 OK\n/' | grep -i -e connected -e "200 OK" | uniq ]]) +# OVN_CURL([CURL_ARGS]) +# +# Execute curl with version-agnostic -w output formatting. +# On unsuccessful connections, curl.out also contains "Connected to () port -1" and the http +# code (e.g. 000) from the -w format, but those are harmless as failure detection uses grep. +m4_define([OVN_CURL], [curl -s -S -o /dev/null -w "Connected to %{remote_ip} (%{remote_ip}) port %{remote_port}\n%{http_code}\n" $1 2>&1 | sed "s/^200$/200 OK/"]) + # CHECK_VRF() # # Perform a requirements check for running VRF tests. diff --git a/tests/multinode.at b/tests/multinode.at index 3df2921ee..cafbd12fe 100644 --- a/tests/multinode.at +++ b/tests/multinode.at @@ -1601,14 +1601,14 @@ OVS_WAIT_UNTIL([m_as ovn-chassis-2 ip netns exec sw0p2 ss -tulpn | grep LISTEN | m_as ovn-gw-1 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack -M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'curl -v 172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59002 2> curl.out']) -M_NS_CHECK_EXEC([ovn-chassis-3], [publicp1], [sh -c 'cat -v curl.out' | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'OVN_CURL(172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59002) > curl.out']) +M_NS_CHECK_EXEC([ovn-chassis-3], [publicp1], [sh -c 'cat -v curl.out'], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) -M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'curl -v 172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59003 2> curl.out']) -M_NS_CHECK_EXEC([ovn-chassis-4], [publicp2], [sh -c 'cat -v curl.out' | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'OVN_CURL(172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59003) > curl.out']) +M_NS_CHECK_EXEC([ovn-chassis-4], [publicp2], [sh -c 'cat -v curl.out'], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -1638,7 +1638,7 @@ m_as ovn-chassis-2 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-1 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack -M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59004 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59004) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -1647,7 +1647,7 @@ chassis2_ct=$(m_as ovn-chassis-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!b chassis1_flow=$(m_as ovn-chassis-1 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') chassis2_flow=$(m_as ovn-chassis-2 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec publicp1 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec publicp1 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -1703,7 +1703,7 @@ m_as ovn-gw-1 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack # Check the flows again for a new source port -M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59005 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59005) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -1712,7 +1712,7 @@ chassis2_ct=$(m_as ovn-chassis-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!b chassis1_flow=$(m_as ovn-chassis-1 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') chassis2_flow=$(m_as ovn-chassis-2 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec publicp1 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec publicp1 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -1758,7 +1758,7 @@ m_as ovn-gw-1 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack # Start a new test using the second DGP as origin (public2) -M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59006 2>curl.out']) +M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59006) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -1767,7 +1767,7 @@ chassis2_ct=$(m_as ovn-chassis-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!b chassis1_flow=$(m_as ovn-chassis-1 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') chassis2_flow=$(m_as ovn-chassis-2 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 ip netns exec publicp2 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 ip netns exec publicp2 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -1823,7 +1823,7 @@ m_as ovn-gw-1 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack # Check the flows again for a new source port using the second DGP as origin (public2) -M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59007 2>curl.out']) +M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59007) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -1832,7 +1832,7 @@ chassis2_ct=$(m_as ovn-chassis-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!b chassis1_flow=$(m_as ovn-chassis-1 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') chassis2_flow=$(m_as ovn-chassis-2 ovs-dpctl dump-flows | sed ':a;N;$!ba;s/\n/\\n/g') -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 ip netns exec publicp2 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 ip netns exec publicp2 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -1883,26 +1883,26 @@ fi # Check multiple requests coming from DGP's public1 and public2 -M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 ip netns exec publicp2 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) -M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec publicp1 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) -M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 ip netns exec publicp2 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) -M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec publicp1 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -1922,13 +1922,13 @@ m_as ovn-gw-1 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack # Check end-to-end request using a new port for VIP -M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'curl -v -O 172.16.0.100:9000/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59008 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [publicp1], [sh -c 'OVN_CURL(172.16.0.100:9000/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59008) > curl.out']) OVS_WAIT_FOR_OUTPUT([m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | M_FORMAT_CT(20.0.1.3) | \ grep tcp | sed -E -e 's/10.0.1.3|10.0.1.4/<cleared>/g' | sort], [0], [dnl tcp,orig=(src=20.0.1.3,dst=<cleared>,sport=59008,dport=80),reply=(src=<cleared>,dst=20.0.1.3,sport=80,dport=59008),zone=<cleared>,protoinfo=(state=<cleared>) ]) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [9000])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec publicp1 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 9000 200 OK ]) @@ -1937,13 +1937,13 @@ m_as ovn-gw-1 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack # Check end-to-end request using a new port for VIP -M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'curl -v -O 172.16.0.100:9000/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59008 2>curl.out']) +M_NS_EXEC([ovn-chassis-4], [publicp2], [sh -c 'OVN_CURL(172.16.0.100:9000/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59008) > curl.out']) OVS_WAIT_FOR_OUTPUT([m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | M_FORMAT_CT(30.0.1.3) | \ grep tcp | sed -E -e 's/10.0.1.3|10.0.1.4/<cleared>/g' | sort], [0], [dnl tcp,orig=(src=30.0.1.3,dst=<cleared>,sport=59008,dport=80),reply=(src=<cleared>,dst=30.0.1.3,sport=80,dport=59008),zone=<cleared>,protoinfo=(state=<cleared>) ]) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [9000])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-4 ip netns exec publicp2 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 9000 200 OK ]) @@ -2156,7 +2156,7 @@ m_as ovn-gw-3 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-4 ovs-appctl dpctl/flush-conntrack # Check direct backend traffic using the same LB ports -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 10.0.2.3:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59013 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(10.0.2.3:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59013) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -2179,7 +2179,7 @@ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/ timed out ]) else -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([10.0.2.3], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 10.0.2.3 (10.0.2.3) port 80 200 OK ]) @@ -2191,7 +2191,7 @@ m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-3 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-4 ovs-appctl dpctl/flush-conntrack -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 10.0.2.4:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59014 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(10.0.2.4:80/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59014) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -2214,14 +2214,14 @@ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/ timed out ]) else -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([10.0.2.4], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 10.0.2.4 (10.0.2.4) port 80 200 OK ]) fi # Check the flows again for the LB VIP -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v 172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59015 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59015) > curl.out']) curl_timeout=$(m_as ovn-chassis-3 cat -v curl.out | grep -i -e "timed out" -e "timeout" -c) @@ -2232,14 +2232,14 @@ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/ timed out ]) else -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) fi # Check the flows again for the LB VIP -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v 172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59016 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(172.16.0.100:80 --retry 0 --connect-timeout 1 --max-time 1 --local-port 59016) > curl.out']) curl_timeout=$(m_as ovn-chassis-3 cat -v curl.out | grep -i -e "timed out" -e "timeout" -c) @@ -2250,7 +2250,7 @@ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/ timed out ]) else -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -2262,11 +2262,11 @@ check multinode_nbctl set load_balancer lb0 options:use_stateless_nat=true check multinode_nbctl --wait=sb set load_balancer lb0 selection_fields="ip_src,tp_src,ip_dst,tp_dst" # Check the flows again for the LB VIP - always needs to be successful regardless of the datapath (one or two gw chassis) -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) M_NS_EXEC([ovn-chassis-1], [sw0p1], [sh -c 'ss -nn >connections.out']) M_NS_EXEC([ovn-chassis-2], [sw0p2], [sh -c 'ss -nn >connections.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -2279,11 +2279,11 @@ OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-2 cat connections.out | grep "FIN-WAIT-2" 0 ]) -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) M_NS_EXEC([ovn-chassis-1], [sw0p1], [sh -c 'ss -nn >connections.out']) M_NS_EXEC([ovn-chassis-2], [sw0p2], [sh -c 'ss -nn >connections.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -2296,11 +2296,11 @@ OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-2 cat connections.out | grep "FIN-WAIT-2" 0 ]) -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) M_NS_EXEC([ovn-chassis-1], [sw0p1], [sh -c 'ss -nn >connections.out']) M_NS_EXEC([ovn-chassis-2], [sw0p2], [sh -c 'ss -nn >connections.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -2313,11 +2313,11 @@ OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-2 cat connections.out | grep "FIN-WAIT-2" 0 ]) -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(172.16.0.100:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) M_NS_EXEC([ovn-chassis-1], [sw0p1], [sh -c 'ss -nn >connections.out']) M_NS_EXEC([ovn-chassis-2], [sw0p2], [sh -c 'ss -nn >connections.out']) -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([172.16.0.100], [80])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 172.16.0.100 (172.16.0.100) port 80 200 OK ]) @@ -2331,7 +2331,7 @@ OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-2 cat connections.out | grep "FIN-WAIT-2" ]) # Direct backend traffic using the same LB ports needs to be dropped -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 10.0.2.3:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(10.0.2.3:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec sw1p1 cat -v curl.out | \ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/' | grep -i -e "timed out" | uniq], [0], [dnl @@ -2339,7 +2339,7 @@ timed out ]) # check again using another source ports -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 10.0.2.3:80/download_file --retry 0 --connect-timeout 1 --max-time 1 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(10.0.2.3:80/download_file --retry 0 --connect-timeout 1 --max-time 1) > curl.out']) OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 ip netns exec sw1p1 cat -v curl.out | \ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/' | grep -i -e "timed out" | uniq], [0], [dnl @@ -2360,7 +2360,7 @@ m_as ovn-gw-2 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-3 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-4 ovs-appctl dpctl/flush-conntrack -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 10.0.2.4:8080/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59017 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(10.0.2.4:8080/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59017) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -2383,7 +2383,7 @@ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/ timed out ]) else -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([10.0.2.4], [8080])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 10.0.2.4 (10.0.2.4) port 8080 200 OK ]) @@ -2396,7 +2396,7 @@ m_as ovn-gw-3 ovs-appctl dpctl/flush-conntrack m_as ovn-gw-4 ovs-appctl dpctl/flush-conntrack # Check again -M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'curl -v -O 10.0.2.4:8080/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59018 2>curl.out']) +M_NS_EXEC([ovn-chassis-3], [sw1p1], [sh -c 'OVN_CURL(10.0.2.4:8080/download_file --retry 0 --connect-timeout 1 --max-time 1 --local-port 59018) > curl.out']) gw1_ct=$(m_as ovn-gw-1 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') gw2_ct=$(m_as ovn-gw-2 ovs-appctl dpctl/dump-conntrack | sed ':a;N;$!ba;s/\n/\\n/g') @@ -2419,7 +2419,7 @@ sed 's/\(.*\)timed out/timed out\n/' | sed 's/\(.*\)connect timeout/timed out\n/ timed out ]) else -OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out | M_FORMAT_CURL([10.0.2.4], [8080])], [0], [dnl +OVS_WAIT_FOR_OUTPUT([m_as ovn-chassis-3 cat -v curl.out], [0], [dnl Connected to 10.0.2.4 (10.0.2.4) port 8080 200 OK ]) @@ -4231,6 +4231,15 @@ check_fake_multinode_setup # Delete the multinode NB and OVS resources before starting the test. cleanup_multinode_resources +M_DAEMONIZE([ovn-gw-1], + [sh -c 'ip -t monitor neigh | awk "/^Timestamp:/{ts=\$5; ms=int(\$7/1000); next} {printf \"%s.%03d %s\n\", ts, ms, \$0; fflush()}"' > neigh_gw1.log 2>&1], + [neigh_mon_gw1.pid]) +M_DAEMONIZE([ovn-gw-2], + [sh -c 'ip -t monitor neigh | awk "/^Timestamp:/{ts=\$5; ms=int(\$7/1000); next} {printf \"%s.%03d %s\n\", ts, ms, \$0; fflush()}"' > neigh_gw2.log 2>&1], + [neigh_mon_gw2.pid]) + +M_NS_DAEMONIZE([ovn-gw-1], [frr-ns ip], [sh -c 'ip -t monitor neigh dev br-10 | awk "/^Timestamp:/{ts=\$5; ms=int(\$7/1000); next} {printf \"%s.%03d %s\n\", ts, ms, \$0; fflush()}"' > frr-gw1.log 2>&1], [frr-gw1.pid]) +M_NS_DAEMONIZE([ovn-gw-2], [frr-ns ip], [sh -c 'ip -t monitor neigh dev br-10 | awk "/^Timestamp:/{ts=\$5; ms=int(\$7/1000); next} {printf \"%s.%03d %s\n\", ts, ms, \$0; fflush()}"' > frr-gw2.log 2>&1], [frr-gw2.pid]) CHECK_VRF() vni0=10 -- 2.47.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
