copr-be: converge the ipv6 networking faster

This commit is contained in:
Pavel Raiskup 2021-07-14 19:48:14 +02:00
parent b9749fd4ec
commit 135d16792e

View file

@ -321,12 +321,16 @@ class LibvirtSpawner:
"""
self.boot_options += ['--network', 'bridge=br0,model=virtio']
self.append_startup_script("\n".join([
"echo ahoj >> /var/tmp/ahoj",
f"nmcli con add con-name '{con_name}' ifname {device} "
"type ethernet",
# Don't automatically start, otherwise DHCPv4 starts, too.
"type ethernet autoconnect no",
f"nmcli con modify '{con_name}' ipv6.address {ipv6_addr}",
f"nmcli con modify '{con_name}' ipv6.gateway {ipv6_gw}",
f"nmcli con modify '{con_name}' ipv4.method disabled",
f"nmcli con up '{con_name}'",
# This makes the IPv6 networking to converge faster
'for _ in `seq 180`; do ping6 -c 1 fedoraproject.org && break ; sleep 1; done',
]))
self.ipv6 = ipv6_addr.split("/")[0]