1
1
mirror of https://pagure.io/fedora-kickstarts.git synced 2024-11-05 08:04:20 +00:00

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 <walters@verbum.org>
This commit is contained in:
Colin Walters 2017-10-24 14:27:17 -04:00
parent dda92b4f95
commit c66511d4f9

View File

@ -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"