copr-be: try to ping6 to wake up ipv6 stack early
Seems like some ppc64le boxes start and seem fine, but they are not accessible over ipv6 for a long time so the spawner timeouts. When I tried to manually ping6 from the box outside - the connection from the outside started to work immediately - so give it an automatic try.
This commit is contained in:
parent
0bc8c0a9c1
commit
c7c983063a
1 changed files with 16 additions and 3 deletions
|
@ -213,10 +213,20 @@ class LibvirtSpawner:
|
||||||
"mount -o remount /",
|
"mount -o remount /",
|
||||||
]))
|
]))
|
||||||
|
|
||||||
|
def ping_to_wake_up_ipv6(self):
|
||||||
|
"""
|
||||||
|
For some reason, this makes makes the networking to converge much
|
||||||
|
faster.
|
||||||
|
"""
|
||||||
|
self.append_startup_script("\n".join([
|
||||||
|
"ping6 fedoraproject.org -c 5 -d || :"
|
||||||
|
]))
|
||||||
|
|
||||||
def generate_config_iso(self):
|
def generate_config_iso(self):
|
||||||
"""
|
"""
|
||||||
Generate the ISO file that is attached to the VM and used by cloud-init
|
Generate the ISO file that is attached to the VM and used by the early
|
||||||
to pre-configure the box.
|
script:
|
||||||
|
https://github.com/praiskup/helpers/blob/beb62e5cf5d8a4cd0e456536a7073dc5307668fd/bin/eimg-prep.in#L66-L76
|
||||||
"""
|
"""
|
||||||
if not self.startup_script:
|
if not self.startup_script:
|
||||||
return None
|
return None
|
||||||
|
@ -230,7 +240,9 @@ class LibvirtSpawner:
|
||||||
file.write(script)
|
file.write(script)
|
||||||
|
|
||||||
image = os.path.join(self.workdir, 'config.iso')
|
image = os.path.join(self.workdir, 'config.iso')
|
||||||
# the 'eimg_config' label is important, we search for /dev/disk/by-label/...
|
|
||||||
|
# The 'eimg_config' label is not important, we search for /dev/sr0
|
||||||
|
# anyway.
|
||||||
if self.call(['mkisofs', '-o', image, '-V', 'eimg_config', '-r', '-J',
|
if self.call(['mkisofs', '-o', image, '-V', 'eimg_config', '-r', '-J',
|
||||||
'--quiet', config_dir]) != 0:
|
'--quiet', config_dir]) != 0:
|
||||||
raise Exception("mkisofs failed")
|
raise Exception("mkisofs failed")
|
||||||
|
@ -438,6 +450,7 @@ def _main():
|
||||||
spawner.swap_vol_size = str(args.swap_vol_size) + "GB"
|
spawner.swap_vol_size = str(args.swap_vol_size) + "GB"
|
||||||
spawner.add_nat_network()
|
spawner.add_nat_network()
|
||||||
spawner.add_bridged_network("Wired connection 2", "eth1", ip6_a, ip6_g)
|
spawner.add_bridged_network("Wired connection 2", "eth1", ip6_a, ip6_g)
|
||||||
|
spawner.ping_to_wake_up_ipv6()
|
||||||
|
|
||||||
success = False
|
success = False
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue