fix(deployment): Added timeout for sender and commented in setup

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-12-31 15:26:42 +01:00
parent 5857beeaf6
commit 89c9a96852

View File

@@ -36,6 +36,9 @@ wedge_setup() {
ssh ncs-wedge "echo $WEDGE_PASS | sudo -S systemctl daemon-reload" ssh ncs-wedge "echo $WEDGE_PASS | sudo -S systemctl daemon-reload"
ssh ncs-wedge "echo $WEDGE_PASS | sudo -S systemctl start l1switch.service" ssh ncs-wedge "echo $WEDGE_PASS | sudo -S systemctl start l1switch.service"
echo "WAITING FOR BFSHELL..."
sleep 30
scp ./03-wedge_port_configure.command ncs-wedge:/tmp/ scp ./03-wedge_port_configure.command ncs-wedge:/tmp/
ssh ncs-wedge "/home/user/bf-sde-9.7.0/install/bin/bfshell -f /tmp/03-wedge_port_configure.command" ssh ncs-wedge "/home/user/bf-sde-9.7.0/install/bin/bfshell -f /tmp/03-wedge_port_configure.command"
@@ -55,11 +58,11 @@ setup_node() {
run_script_via_ssh "$node_script" "$node" $USER_PASS run_script_via_ssh "$node_script" "$node" $USER_PASS
} }
# wedge_setup wedge_setup
# setup_node 1 setup_node 1
# setup_node 2 setup_node 2
read -p "YOU WILL NEED TO PRESS CTRL+C AT SOME POINT SINCE THE RECEIVER WILL RUN INDEFINETLY. (Press any key to confirm.)" -n1 -s # read -p "YOU WILL NEED TO PRESS CTRL+C AT SOME POINT SINCE THE RECEIVER/SENDER WILL RUN INDEFINITELY. (Press any key to confirm.)" -n1 -s
TIMEOUT=30 TIMEOUT=30
ssh ncs-node1 "echo $USER_PASS | sudo -S timeout $TIMEOUT ip netns exec tb_node1_if0 python3 receiver.py 10.0.2.1 30123 30123" & ssh ncs-node1 "echo $USER_PASS | sudo -S timeout $TIMEOUT ip netns exec tb_node1_if0 python3 receiver.py 10.0.2.1 30123 30123" &