summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Hansen <tony@att.com>2017-11-01 15:12:11 +0000
committerTony Hansen <tony@att.com>2017-11-01 15:12:26 +0000
commit73e66b913bfad7105f94a84f3f957620fb12bcba (patch)
treed0801a5f26b98dcf8f1a27516a292375fc47623c
parenta61ae188668c613539290750fd22f6effa615fe1 (diff)
add loop to ensure DHCP ran
if dnsdomainname didn't succeed, try again at 10-second intervals up to 20 additional times Change-Id: I6774f9386badaa72d667812d09e872b35e9e58a3 Signed-off-by: Tony Hansen <tony@att.com> Issue-ID: DCAEGEN2-185
-rw-r--r--blueprints/pgaas-cluster.yaml-template15
-rw-r--r--blueprints/pgaas-onevm.yaml-template15
-rw-r--r--blueprints/pgaas.yaml-template15
3 files changed, 42 insertions, 3 deletions
diff --git a/blueprints/pgaas-cluster.yaml-template b/blueprints/pgaas-cluster.yaml-template
index 6ad8901..9a85288 100644
--- a/blueprints/pgaas-cluster.yaml-template
+++ b/blueprints/pgaas-cluster.yaml-template
@@ -64,7 +64,20 @@ inputs:
then
echo WARNING WARNING WARNING
echo The DNS DHCP settings did not work properly.
- exit 1
+ for i in $(seq 20)
+ do
+ echo Sleeping...
+ sleep 10
+ if [ "$(dnsdomainname 2>/dev/null)" != "" ]
+ then break
+ fi
+ echo The DNS DHCP settings still did not work properly.
+ done
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo Exiting
+ exit 1
+ fi
fi
CONFDIR=/var/config/DCAE/chef/
diff --git a/blueprints/pgaas-onevm.yaml-template b/blueprints/pgaas-onevm.yaml-template
index 1575374..ec7aa36 100644
--- a/blueprints/pgaas-onevm.yaml-template
+++ b/blueprints/pgaas-onevm.yaml-template
@@ -57,7 +57,20 @@ inputs:
then
echo WARNING WARNING WARNING
echo The DNS DHCP settings did not work properly.
- exit 1
+ for i in $(seq 20)
+ do
+ echo Sleeping...
+ sleep 10
+ if [ "$(dnsdomainname 2>/dev/null)" != "" ]
+ then break
+ fi
+ echo The DNS DHCP settings still did not work properly.
+ done
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo Exiting
+ exit 1
+ fi
fi
CONFDIR=/var/config/DCAE/chef/
diff --git a/blueprints/pgaas.yaml-template b/blueprints/pgaas.yaml-template
index 9158e79..245b564 100644
--- a/blueprints/pgaas.yaml-template
+++ b/blueprints/pgaas.yaml-template
@@ -57,7 +57,20 @@ inputs:
then
echo WARNING WARNING WARNING
echo The DNS DHCP settings did not work properly.
- exit 1
+ for i in $(seq 20)
+ do
+ echo Sleeping...
+ sleep 10
+ if [ "$(dnsdomainname 2>/dev/null)" != "" ]
+ then break
+ fi
+ echo The DNS DHCP settings still did not work properly.
+ done
+ if [ "$(dnsdomainname 2>/dev/null)" = "" ]
+ then
+ echo Exiting
+ exit 1
+ fi
fi
CONFDIR=/var/config/DCAE/chef/