summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2017-10-19 01:41:26 -0400
committerLusheng Ji <lji@research.att.com>2017-10-19 01:41:33 -0400
commit532197c07ffef4003f8cd04d787ff46eb2f49b95 (patch)
tree8a4f3dec4293f40d112475da5cbae684fcdc57e9
parentdae872dcf4dfa3327ee9a089b3a1124b769ff2b8 (diff)
Fix DockerBP getting empty pub IP problem
Issue-Id: DCAEGEN2-128 Change-Id: I87f682a5aa7288de03711fff9d78f36b3a9fe306 Signed-off-by: Lusheng Ji <lji@research.att.com>
-rw-r--r--blueprints/DockerBP.yaml-template5
1 files changed, 4 insertions, 1 deletions
diff --git a/blueprints/DockerBP.yaml-template b/blueprints/DockerBP.yaml-template
index 28f2180..1a5f025 100644
--- a/blueprints/DockerBP.yaml-template
+++ b/blueprints/DockerBP.yaml-template
@@ -111,7 +111,10 @@ inputs:
type: string
default: |
MYIP=`wget -qO- http://169.254.169.254/2009-04-04/meta-data/local-ipv4`
- MYPUB=`wget -qO- http://169.254.169.254/2009-04-04/meta-data/public-ipv4`
+ while [ -z "$MYPUB" ]; do
+ MYPUB=`wget -qO- http://169.254.169.254/2009-04-04/meta-data/public-ipv4`
+ sleep 5
+ done
echo "My public IP: $MYPUB"
MYNAME=`hostname`
echo >>/etc/hosts