Merge "Wait for ipv6 addrs when launching nodes"

This commit is contained in:
Zuul 2020-09-22 19:39:14 +00:00 committed by Gerrit Code Review
commit 6fc894b26b

View File

@ -126,6 +126,14 @@ def bootstrap_server(server, key, name, volume_device, keep,
ssh_client.ssh('(ifdown eth0 && ifup eth0) || true')
if server.public_v6:
# The server may be waiting on Router Advertisements to configure
# this address. Wait for that to complete before pinging.
ssh_client.ssh("bash -c 'count=0 ; "
"while ! ip addr | grep -q %s && [\"$count\" -le 60 ] ; do "
" count=$((count + 1)) ; "
" echo \"Waiting for IPv6 address to configure\" ; "
" sleep 1 ; "
"done'" % server.public_v6)
ssh_client.ssh('ping6 -c5 -Q 0x10 review.openstack.org '
'|| ping6 -c5 -Q 0x10 wiki.openstack.org')