Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/372880 )

Change subject: bootstrap_vz: chase more setup races
......................................................................

bootstrap_vz: chase more setup races

I think the cases I'm looking at now have the VM booting
before nova-network has finished setting up the network
stack entirely.  So, during our retry loop, reset if0
and postpone other network activities until we have some
sort of response from that.

Bug: T165555
Change-Id: I8092a8adf66688cc7f84935b02276acb9ed3197e
---
M modules/labs_bootstrapvz/files/firstboot.sh
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/80/372880/1

diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index b3c85f7..cea5d7f 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -59,10 +59,7 @@
 fi
 # At this point, all (the rest of) our disk are belong to LVM.
 
-project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project_id\": \"//'  | sed -r 's/\".*$//g'`
-ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
 hostname=`hostname`
-
 # If we're getting ahead of the dnsmasq config, loop until our hostname is
 #  actually ready for us.  Five minutes, total.
 for run in {1..30}
@@ -75,10 +72,15 @@
     echo `date`
     echo "Waiting for hostname to return the actual hostname."
     sleep 10
+    ifdown eth0
+    ifup eth0
     /sbin/dhclient -1 eth0
     hostname=`hostname`
 done
 
+project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project_id\": \"//'  | sed -r 's/\".*$//g'`
+ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
+
 # domain is the last two domain sections, e.g. eqiad.wmflabs
 domain=`hostname -d | sed -r 's/.*\.([^.]+\.[^.]+)$/\1/'`
 

-- 
To view, visit https://gerrit.wikimedia.org/r/372880
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8092a8adf66688cc7f84935b02276acb9ed3197e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <abog...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to