Revert "Fallback to persistent netifs names with systemd"
This reverts commit 8401290976
.
We are reverting this because some users may want to use predictable
device names and may not even use Debian. However, after some
investigation we have found a couple of bugs in dhcp-all-interfaces on
Debuntu distros. The parent change corrects those bugs. Additionally new
Linux kernels emit "move" events to udev when interfaces are renamed to
their predictable name. Support this "move" in the dhcp-all-interfaces
udev rules. Making these changes appaers to produce functional images
for Debian users using predictable device names. If predictable device
names are not desired turning them off is straightforward and release
notes are updated to give users the info they need to do that outside of
this element.
Change-Id: I125f1a0c78a103b51bda961528c3e66c345bf604
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This commit is contained in:
parent
7b41f8160b
commit
b97dfb8fbd
@ -72,7 +72,6 @@ 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-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
|
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
|
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
|
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
|
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
|
update-rc.d dhcp-all-interfaces defaults
|
||||||
|
@ -1 +1 @@
|
|||||||
SUBSYSTEM=="net", KERNEL!="lo", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="dhcp-interface@$name.service"
|
SUBSYSTEM=="net", KERNEL!="lo", ACTION=="add|move", TAG+="systemd", ENV{SYSTEMD_WANTS}+="dhcp-interface@$name.service"
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
issues:
|
||||||
|
- |
|
||||||
|
The dhcp-all-interfaces element attempts to work with "predictable
|
||||||
|
interface names". During boot the name of the interfaces is changed from
|
||||||
|
ethX to the new scheme, for example enpXsX; depending on the Linux kernel
|
||||||
|
this move may be captured by udev as an "add" or "move" event. The
|
||||||
|
dhcp-all-interfaces udev rule has been updated to match against both
|
||||||
|
possible events. If you prefer to not use predictable names your image
|
||||||
|
builds can set DIB_BOOTLOADER_DEFAULT_CMDLINE with net.ifnames=0 or mask
|
||||||
|
the default policy with `ln -s /dev/null /etc/systemd/network/99-default.link`.
|
||||||
|
This process is documented by systemd:
|
||||||
|
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
|
||||||
|
|
||||||
|
Note that this update reverts previous changes to disable predictable
|
||||||
|
interface names completely when using dhcp-all-interfaces. Predictable
|
||||||
|
device names were disabled in an effort to make dhcp-all-interfaces
|
||||||
|
function on Debian Bullseye, but this broke any users that wished to
|
||||||
|
use predictable device names. Instaed we make predictable device names
|
||||||
|
work on Debian Bullseye and allow users to disable predictable device
|
||||||
|
names should they choose to.
|
Loading…
Reference in New Issue
Block a user