aoetools initramfs hooks starts dhcclient for every intrface on boot

Bug #1905472 reported by Andrey Lelikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
aoetools (Ubuntu)
Expired
Undecided
Unassigned
ifupdown (Ubuntu)
Invalid
Undecided
Unassigned
initramfs-tools (Ubuntu)
Expired
Undecided
Unassigned
netplan.io (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

After upgrade frpm 18LTS to 20LTS I've lost the network.

Network is managed by ifupdown
Netplan is not installed
Network manger is disabled (masked)

Yet, at boot, SOMETHING starts dhclient for every network interface. This has disastrous results - dhcp request succeeds on physical interface that is a base for a vlan-based interface, causing real dhcp request on to fail on vlan interface.

Expected behavior - dhclient starts only for interfaces marked as dhcp in /etc/network/interfaces .

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: isc-dhcp-client 4.4.1-2.1ubuntu5
ProcVersionSignature: Ubuntu 5.8.0-29.31~20.04.1-generic 5.8.14
Uname: Linux 5.8.0-29-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.12
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Nov 25 00:07:45 2020
SourcePackage: isc-dhcp
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Andrey Lelikov (lagnchpad) wrote :
Revision history for this message
Andrey Lelikov (lagnchpad) wrote :

The culprit is intramfs. Starting with 20 LTS, having an AOE device brings in local_top/aoe, which calls configure_networking . This causes dhcp configuration of the primary net interface, which screws up all network later (as this physical interface is part of the bridge, and bridge can't get a dhcp lease later).

AOE stands for "ATA over ETHERNET", not ATA over IP. There is zero need to bring up ip stack for aoe to function.

no longer affects: isc-dhcp (Ubuntu)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

ubuntu-core-initramfs project is not used on Ubuntu 20.04 LTS servers and desktops.

However I also don't think this is caused by initramfs.

It would help for you to check your NetworkManager configuration, netplan configuration and ifupdwon configurations.

affects: ubuntu-core-initramfs → initramfs-tools (Ubuntu)
Changed in initramfs-tools (Ubuntu):
status: New → Incomplete
Changed in ifupdown (Ubuntu):
status: New → Incomplete
Changed in netplan.io (Ubuntu):
status: New → Incomplete
Revision history for this message
Andrey Lelikov (lagnchpad) wrote :

This has nothing to do with network, as mentioned earlier netplan is masked and ifupdown works as expected. Moreover it is known EXACTLY what happens (in initramfs):

local_top/aoe calls configure_networking

In absence of any kernel args, configure_networking tries to bring up every interface, by launching dhcpc for 3(?) seconds. This succeeds for interface that will be configured as part of bridge by ifupdown later, so bridge is left unconfigured and network is lost.

The current workaround is to add ip=none to kernel line

The proper fix is to change configure_networking to have a mode/arg where it brings up network interfaces bot does not try to assign ip addresses, and call it this way from local_top/aoe . Probably even split configure_networking into two functions...

p.s. I can predict the future though (I have such a gift) - the resolution would be "AOE is used by 0.000000000000000001% of ubuntu users, we power the word and store petabytes of data, mark this as enhancement for a future version N+5".

Revision history for this message
Andrey Lelikov (lagnchpad) wrote :

Oh, and just noticed that it was marked as "incomplete". Truly, I CAN see the future...

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I marked the bug incomplete, when asking for additional information. Which is a normal bug processing procedure. This happened _before_ your comment #4 and #5.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

aoe hook is provided by https://packages.ubuntu.com/source/hirsute/aoetools

If you need this package, but you do not want aoe hook to fire in the initramfs, you can as a local override dissable it with:

dpkg-statoverride --add --update root root 0644 /usr/share/initramfs-tools/scripts/local-top/aoe

Or if you have recommendations to improve it, please share your thoughts.

Your remarks in your comments are not polite. Please check out https://ubuntu.com/community/code-of-conduct

Changed in ifupdown (Ubuntu):
status: Incomplete → Invalid
Changed in netplan.io (Ubuntu):
status: Incomplete → Invalid
Changed in initramfs-tools (Ubuntu):
status: Incomplete → New
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

aoetools is effectively unchanged, and their initramfs_hook is the same since xenial.

in the initramfs-tools the changes between 18.04 LTS and 20.04 LTS are that for automatic IP bring up, more methods are now supported with more robust IPv4 DHCP and IPv6 DHCP.

Was your 18.04 LTS installation customized to prevent DCHP in the initrd? Or was DHCP attempted in 18.04 LTS and simply was failing, keeping things working? Is this something you can rectify with preup ifupdown hooks, such that dhcp leases that are not needed are removed in the running system? Or is booting with ip=none parameter sufficient for you?

Please indicate what has changed, to cause failures. Because the behaviour of aoetools in stock configuration between 18.04 LTS and 20.04 LTS is expected to be the same, with dhcp being performed from the initrd by default.

Changed in aoetools (Ubuntu):
status: New → Incomplete
Changed in initramfs-tools (Ubuntu):
status: New → Incomplete
summary: - Something starts dhcclient for every intrface on boot
+ aoetools initramfs hooks starts dhcclient for every intrface on boot
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for aoetools (Ubuntu) because there has been no activity for 60 days.]

Changed in aoetools (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for initramfs-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in initramfs-tools (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.