From c19795a68968f0c7ef1b5652411bab44cd1caa35 Mon Sep 17 00:00:00 2001 From: Alejandro Andreu Date: Wed, 15 Mar 2017 19:18:37 +0100 Subject: [PATCH] Only proceed to create static uplink if the router interface is already created Change-Id: Ic63cbcb7aa0832aeadbf85c2470e7f259b378bab --- templates/gateway/create_fake_uplink_l2.sh.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/gateway/create_fake_uplink_l2.sh.erb b/templates/gateway/create_fake_uplink_l2.sh.erb index 0440b93..a591681 100644 --- a/templates/gateway/create_fake_uplink_l2.sh.erb +++ b/templates/gateway/create_fake_uplink_l2.sh.erb @@ -73,6 +73,11 @@ fi # Create a port on the edge router and bind it to the veth pair ROUTER_ID=$(midonet-cli -A -e router list | grep ${EDGE_ROUTER} | awk '{ print $2 }') + +while [ -z $(midonet-cli -A -e host ${HOST_ID} binding list | grep veth1 | awk '{ print $6}') ]; do + echo "ZzZ..." + sleep 5 +done PORT_ID=$(midonet-cli -A -e host ${HOST_ID} binding list | grep veth1 | awk '{ print $6}') if [ -z "$(midonet-cli -A -e router ${ROUTER_ID} route list | grep "src 0.0.0.0/0 dst 0.0.0.0/0 gw ${VETH0_IP} port ${PORT_ID}")" ]; then