From 27634ecd26834d5242b7707b9e463ea90b9cf1bf Mon Sep 17 00:00:00 2001 From: Serhiy Ovsianikov Date: Tue, 3 Mar 2015 09:05:53 +0200 Subject: [PATCH] Slave nodes are not booted We restart all the NICs of master node after we ensure Cobbler is ready. Restarting NIC breaks network connection between Cobbler and outgoing physical network. Added another restart of the docker container after network restart. Change-Id: I0bbba2fbad801e109f52ee5fbcf203b8ba7d1dd8 Closes-Bug: #1427227 --- virtualbox/functions/product.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/virtualbox/functions/product.sh b/virtualbox/functions/product.sh index 37ff905f8..cbc19f57d 100755 --- a/virtualbox/functions/product.sh +++ b/virtualbox/functions/product.sh @@ -249,18 +249,19 @@ enable_outbound_network_for_product_vm() { expect "$prompt" send "dockerctl restart cobbler >/dev/null 2>&1\r" expect "$prompt" - send "dockerctl check cobbler >/dev/null 2>&1\r" - expect "*ready*" - expect "$prompt" send "service network restart >/dev/null 2>&1\r" expect "*OK*" expect "$prompt" + send "dockerctl restart cobbler >/dev/null 2>&1\r" + expect "$prompt" + send "dockerctl check cobbler >/dev/null 2>&1\r" + expect "*ready*" + expect "$prompt" send "for i in 1 2 3 4 5; do ping -c 2 google.com || ping -c 2 wikipedia.com || sleep 2; done\r" expect "*icmp*" expect "$prompt" ENDOFEXPECT ) - # When you are launching command in a sub-shell, there are issues with IFS (internal field separator) # and parsing output as a set of strings. So, we are saving original IFS, replacing it, iterating over lines, # and changing it back to normal