mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 14:02:12 +08:00
copr-be: converge the ipv6 networking faster
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user