1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-22 05:53:09 +00:00

Use some nmcli con down/ups to workaround RHBZ #1739148

Restarting NetworkManager.service doesn't seem to apply our
newly-created static config in Rawhide any more (again!), since
NetworkManager 1.20.0-0.5.fc31 landed. This seems to work around
the bug.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-07-05 16:40:43 -07:00
parent 3d3bc1e2d2
commit 4dae3d2168

View File

@ -52,6 +52,12 @@ sub setup_tap_static {
my $conftext = "DEVICE=eth0\nBOOTPROTO=none\nIPADDR=$ip\nGATEWAY=10.0.2.2\nPREFIX=24\nDEFROUTE=yes\nONBOOT=yes" . $dnstext; my $conftext = "DEVICE=eth0\nBOOTPROTO=none\nIPADDR=$ip\nGATEWAY=10.0.2.2\nPREFIX=24\nDEFROUTE=yes\nONBOOT=yes" . $dnstext;
assert_script_run "printf '${conftext}\n' > /etc/sysconfig/network-scripts/ifcfg-eth0"; assert_script_run "printf '${conftext}\n' > /etc/sysconfig/network-scripts/ifcfg-eth0";
assert_script_run "systemctl restart NetworkManager.service"; assert_script_run "systemctl restart NetworkManager.service";
# FIXME workaround for
# https://bugzilla.redhat.com/show_bug.cgi?id=1739148
# remove when that's resolved
script_run 'nmcli con down "Wired connection 1"';
script_run 'nmcli con down "System eth0"';
script_run 'nmcli con up "System eth0"';
# the above doesn't seem to reliably set up resolv.conf, so... # the above doesn't seem to reliably set up resolv.conf, so...
clone_host_file "/etc/resolv.conf"; clone_host_file "/etc/resolv.conf";
} }