diff --git a/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces b/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces index 9b7223117..ee8de0c95 100755 --- a/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +++ b/diskimage_builder/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces @@ -64,6 +64,7 @@ elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules sed -i "s/TimeoutStartSec=DIB_DHCP_TIMEOUT/TimeoutStartSec=$(( ${DIB_DHCP_TIMEOUT:-30} * 2 ))s/" /usr/lib/systemd/system/dhcp-interface@.service + install -D -g root -o root -m 0644 ${SCRIPTDIR}/udev-net-setup-link.rules /etc/udev/rules.d/80-net-setup-link.rules elif [ "$DIB_INIT_SYSTEM" == "sysv" ]; then install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces update-rc.d dhcp-all-interfaces defaults diff --git a/diskimage_builder/elements/dhcp-all-interfaces/install.d/udev-net-setup-link.rules b/diskimage_builder/elements/dhcp-all-interfaces/install.d/udev-net-setup-link.rules new file mode 100644 index 000000000..e69de29bb diff --git a/releasenotes/notes/persistent-netifs-fallback-1b861e037dd8a27c.yaml b/releasenotes/notes/persistent-netifs-fallback-1b861e037dd8a27c.yaml new file mode 100644 index 000000000..21fd21907 --- /dev/null +++ b/releasenotes/notes/persistent-netifs-fallback-1b861e037dd8a27c.yaml @@ -0,0 +1,12 @@ +--- +fixes: + - | + The dhcp-all-interfaces element does not work correctly with the new + "predictable names" scheme for network interfaces. + During boot the name of the interfaces is changed from ethX to the new + scheme, for example enpXsX; this name change is not detected by udev de + facto making the udev rule of the dhcp-all-interfaces element useless; + this causes the machine booted with the image including the dhcp-all-interfaces + element to not get any ip and so being unreachable from the network. + This patch includes a workaround to fallback to the "persistent names" + scheme allowing the dhcp-all-interfaces element to work again as intended.