From 0604b47f742f4a4dbe6a3151c962dc05df1a833c Mon Sep 17 00:00:00 2001 From: Carsten Lund Date: Wed, 10 May 2017 11:31:46 +0000 Subject: [DCAE-7] DCAE controller miss flavor in first poll Change-Id: Ie0f32650fa4ef31ff015b31d8d5cb94378d79cad Signed-off-by: Carsten Lund --- .../src/main/docker-build/controller-startup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dcae-demo-controller/src/main/docker-build/controller-startup.sh b/dcae-demo-controller/src/main/docker-build/controller-startup.sh index e31c72b..9e284bb 100644 --- a/dcae-demo-controller/src/main/docker-build/controller-startup.sh +++ b/dcae-demo-controller/src/main/docker-build/controller-startup.sh @@ -16,6 +16,7 @@ export BASE=$(grep BASE /opt/app/dcae-controller/config.yaml | sed s/BASE:.//) OPENSTACK_KEYNAME=$(grep OPENSTACK-KEYNAME /opt/app/dcae-controller/config.yaml | sed s/OPENSTACK-KEYNAME:.//) NETWORK=$(grep OPENSTACK-PRIVATE-NETWORK /opt/app/dcae-controller/config.yaml | sed s/OPENSTACK-PRIVATE-NETWORK:.//) +FLAVOR=$(grep FLAVOR-LARGE /opt/app/dcae-controller/config.yaml | sed s/FLAVOR-LARGE:.//) echo nameserver 10.0.0.1 >> /etc/resolv.conf @@ -39,6 +40,18 @@ bin/dcae-controller.sh deploy-user -l $ZONE -p OPEN-ECOMP -u $OPENSTACK_KEYNAME NETWORKPATH=/openstack/locations/$ZONE/projects/OPEN-ECOMP/networks/$NETWORK KEYPATH=/openstack/locations/$ZONE/projects/OPEN-ECOMP/keypairs/$OPENSTACK_KEYNAME +FLAVORPATH=/openstack/locations/$ZONE/flavors/$FLAVOR + +## wait for flavor but since flavor name may have spaces which 'wait-for' does not support we do this hack +## wait 11 minutes + +i=0 +until [ $i = "66" ]; do + ((i++)) + if [ -e "data/resources/$FLAVORPATH" ]; then break; fi + echo waiting for data/resources/$FLAVORPATH + sleep 10 +done sleep 1m bin/dcae-controller.sh wait-for --timeout 300 --frequency 5 --path $NETWORKPATH --exists --verbose -- cgit 1.2.3-korg