From c66511d4f97bd999acd6e6838f953a8b83b92116 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 24 Oct 2017 14:27:17 -0400 Subject: [PATCH] atomic-host: Stop overriding /etc/udev/rules.d/80-net-setup-link.rules This bit was cargo culted from the old school Fedora Cloud image, but we have also been using `net.ifnames=0` on the kernel command line, which ensures that we get `eth0` as "the" NIC name. (There's a huge amount of history behind this and I'm not trying to change that behavior here) The problem is that those udev rules do *other* things that we do want, such as ensure that `veth` devices get `NM_CONTROLLED=no`. Without that e.g. NetworkManager might try to do DHCP on those devices, which is at best slow since they appear and disappear frequently, and at worst risks the host network configuration. For more information, see [RH bz#1503347](https://bugzilla.redhat.com/show_bug.cgi?id=1503347) Signed-off-by: Colin Walters --- fedora-atomic.ks | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fedora-atomic.ks b/fedora-atomic.ks index eade5b8..26e5353 100644 --- a/fedora-atomic.ks +++ b/fedora-atomic.ks @@ -94,12 +94,9 @@ NETWORKING=yes NOZEROCONF=yes EOF -# For cloud images, 'eth0' _is_ the predictable device name, since -# we don't want to be tied to specific virtual (!) hardware -rm -f /etc/udev/rules.d/70* -ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules - -# simple eth0 config, again not hard-coded to the build hardware +# Remove any persistent NIC rules generated by udev +rm -vf /etc/udev/rules.d/*persistent-net*.rules +# And ensure that we will do DHCP on eth0 on startup cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF DEVICE="eth0" BOOTPROTO="dhcp"