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
This commit is contained in:
Serhiy Ovsianikov 2015-03-03 09:05:53 +02:00
parent 89f22db486
commit ad8aaacc91
1 changed files with 5 additions and 4 deletions

View File

@ -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