Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Vagrant based developmen scripts. #89

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions provisioning/start_traffic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \;
2 changes: 1 addition & 1 deletion provisioning/start_traffic_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \;
25 changes: 15 additions & 10 deletions setup_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}

Expand All @@ -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
}


Expand Down
Loading