From 1689431fae431906f9a45644d2389b600d79ff3a Mon Sep 17 00:00:00 2001 From: Eelco Chaudron Date: Tue, 16 Apr 2024 15:49:35 +0200 Subject: [PATCH] Fix Vagrant based developmen scripts. Guess the Vagrant based development scripts have not been used for a while. This patch fixes all the issues introduced by the various intermediate commits. Signed-off-by: Eelco Chaudron --- provisioning/start_traffic.sh | 16 ++++++++-------- provisioning/start_traffic_server.sh | 2 +- setup_dev.sh | 25 +++++++++++++++---------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/provisioning/start_traffic.sh b/provisioning/start_traffic.sh index baaa438..f68500d 100755 --- a/provisioning/start_traffic.sh +++ b/provisioning/start_traffic.sh @@ -13,18 +13,18 @@ tmux new -s traffic \; \ select-pane -t 7 \; \ split-window -h \; \ select-pane -t 1 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p3 nping -c 100000000 --icmp 10.0.0.3 10.0.0.6 20.0.0.1 20.0.0.3 8.8.8.8 172.16.0.110' C-m \; \ + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p3 nping -c 100000000 --icmp 11.0.0.3 11.0.0.6 21.0.0.1 21.0.0.3 8.8.8.8 172.16.0.110' C-m \; \ select-pane -t 2 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p3 nping -c 100000000 --udp 10.0.0.3 10.0.0.6 20.0.0.1 20.0.0.3 172.16.0.110' C-m \; \ + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p3 nping -c 100000000 --udp 11.0.0.3 11.0.0.6 21.0.0.1 21.0.0.3 172.16.0.110' C-m \; \ select-pane -t 3 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p3 nping -c 100000000 --arp 10.0.0.3 10.0.0.6' C-m \; \ + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p3 nping -c 100000000 --arp 11.0.0.3 11.0.0.6' C-m \; \ select-pane -t 4 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p3 nping -c 100000000 --tcp 10.0.0.3 10.0.0.6 20.0.0.1 20.0.0.3 172.16.0.110' C-m \; \ + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p3 nping -c 100000000 --tcp 11.0.0.3 11.0.0.6 21.0.0.1 21.0.0.3 172.16.0.110' C-m \; \ select-pane -t 5 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p1 ping6 2000::3' C-m \; \ + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p1 ping6 2001::3' C-m \; \ select-pane -t 6 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p1 ping6 -t 1 2000::3' C-m \; \ + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p1 ping6 -t 1 2001::3' C-m \; \ select-pane -t 7 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p3 ping 20.0.0.3 -t 1' C-m \; \ + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p3 ping 21.0.0.3 -t 1' C-m \; \ select-pane -t 8 \; \ - send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw0p1 bash -c "export RS_CS_LABEL=1-1; export PATH=/vagrant/uperf_git/src:${PATH}; cp -rv /vagrant/bench-uperf_git/xml-files/ /tmp/; /vagrant/bench-uperf_git/uperf-client --test-type=rr --server-ifname=sw0p1 --wsize=64 --rsize=1024 --duration=3600 --protocol=tcp --nthreads=4096 --remotehost=10.0.0.6"' C-m \; + send-keys 'podman exec -it ovn-chassis-1 ip netns exec sw01p1 bash -c "export TOOLBOX_HOME=/vagrant/bench-uperf_git/toolbox; export RS_CS_LABEL=1-1; export PATH=/vagrant/uperf_git/src:${PATH}; cp -rv /vagrant/bench-uperf_git/xml-files/ /tmp/; /vagrant/bench-uperf_git/uperf-client --test-type=rr --wsize=64 --rsize=1024 --duration=3600 --protocol=tcp --nthreads=1024 --remotehost=11.0.0.6"' C-m \; diff --git a/provisioning/start_traffic_server.sh b/provisioning/start_traffic_server.sh index 1fa1ec8..922cd8d 100755 --- a/provisioning/start_traffic_server.sh +++ b/provisioning/start_traffic_server.sh @@ -2,4 +2,4 @@ UPERF=/vagrant/uperf_git/src/uperf tmux new -d -s uperf_server \; \ - send-keys "podman exec -it ovn-chassis-2 ip netns exec sw0p4 $UPERF -s -P 20005 -v" C-m \; + send-keys "podman exec -it ovn-chassis-2 ip netns exec sw01p4 $UPERF -s -P 30002 -v" C-m \; diff --git a/setup_dev.sh b/setup_dev.sh index f050afe..bb4877a 100755 --- a/setup_dev.sh +++ b/setup_dev.sh @@ -152,6 +152,7 @@ EOF # NOTE: the rpcbind packages update takes long to complete! function install_packages() { + dnf config-manager --set-enabled powertools dnf -y update dnf install -y \ aspell \ @@ -233,6 +234,10 @@ function install_uperf() git clone https://github.com/perftool-incubator/bench-uperf bench-uperf_git sed -i 's/^exec >uperf-client-stderrout.txt/#exec >uperf-client-stderrout.txt/g' ./bench-uperf_git/uperf-client sed -i 's/^exec 2>&1/#exec 2>&1/g' ./bench-uperf_git/uperf-client + sed -i 's/\/usr\/bin\/uperf-base/\/vagrant\/bench-uperf_git\/uperf-base/g' ./bench-uperf_git/uperf-client + pushd bench-uperf_git + git clone https://github.com/perftool-incubator/toolbox.git + popd chown -R vagrant ./bench-uperf_git fi } @@ -365,23 +370,23 @@ function start_ovn_cluster() function start_traffic() { # Start uperf server in tmux - if runuser -l vagrant -c "tmux has-session -t uperf_server" 2>/dev/null + if tmux has-session -t uperf_server 2>/dev/null then echo "- uperf tmux session running, please check!!" else podman exec ovn-chassis-2 dnf install -y lksctp-tools echo "- Starting uperf server in tmux session \"uperf_server\"" - runuser -l vagrant -c /vagrant/provisioning/start_traffic_server.sh + . /vagrant/provisioning/start_traffic_server.sh fi # Start traffic in tmux session - if runuser -l vagrant -c "tmux has-session -t traffic" 2>/dev/null + if tmux has-session -t traffic 2>/dev/null then echo "- Traffic tmux session running, please check!!" else - podman exec ovn-chassis-1 dnf install -y lksctp-tools + podman exec ovn-chassis-1 dnf install -y jq lksctp-tools echo "- Starting traffic in tmux session \"traffic\"" - runuser -l vagrant -c /vagrant/provisioning/start_traffic.sh + . /vagrant/provisioning/start_traffic.sh fi } @@ -391,11 +396,11 @@ function start_traffic() # function configure_ovn() { - ! podman exec ovn-central ovn-nbctl acl-add sw0 to-lport 100 "ip4.src==10.128.2.2" allow-related - podman exec ovn-chassis-1 ip netns exec sw0p1 ip link set dev sw0p1 mtu 1440 - podman exec ovn-chassis-1 ip netns exec sw0p3 ip link set dev sw0p3 mtu 1440 - podman exec ovn-chassis-2 ip netns exec sw0p4 ip link set dev sw0p4 mtu 1440 - podman exec ovn-chassis-2 ip netns exec sw1p1 ip link set dev sw1p1 mtu 1440 + ! podman exec ovn-central-az1-1 ovn-nbctl acl-add sw01 to-lport 100 "ip4.src==10.128.2.2" allow-related + podman exec ovn-chassis-1 ip netns exec sw01p1 ip link set dev sw01p1 mtu 1440 + podman exec ovn-chassis-1 ip netns exec sw01p3 ip link set dev sw01p3 mtu 1440 + podman exec ovn-chassis-2 ip netns exec sw01p4 ip link set dev sw01p4 mtu 1440 + podman exec ovn-chassis-2 ip netns exec sw11p1 ip link set dev sw11p1 mtu 1440 }