Commit the OVS switch topology after restarting the VMs

This commit is contained in:
Pim van Pelt
2022-10-19 14:40:36 +02:00
parent 9ccdb08bdb
commit b85ab65fb5

View File

@ -1,10 +1,17 @@
#!/bin/sh
BUILD=${BUILD:=default}
LAB=${LAB:=0}
## Do not touch below this line
LABDIR=/var/lab
STAGING=$LABDIR/staging
HVN="hvn${LAB}.lab.ipng.ch"
## Bring back into pristine state
echo "* Restarting VMs from pristine snapshot"
ssh root@$HVN "set -x; for node in 0 1 2 3; do VM=vpp${LAB}-\${node}; virsh destroy \$VM; zfs rollback ssd-vol0/\${VM}@pristine; virsh start \$VM; done"
echo "* Committing OVS config"
scp overlays/$BUILD/ovs-config.sh root@$HVN:$LABDIR
ssh root@$HVN "set -x; $LABDIR/ovs-config.sh"