dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
585 stars 395 forks source link

`network-legacy` vs `network-manager` #1876

Open aafeijoo-suse opened 1 year ago

aafeijoo-suse commented 1 year ago

These are the differences I found between the command line parameters of the network-legacy and network-manager modules. This is just a heads-up, the importance of the missing/different features should be assessed before thinking about dropping the legacy module.

aafeijoo-suse commented 1 year ago

@bengal @lkundrak could you share your thoughts on the missing/different features? Thanks.

bengal commented 1 year ago
    * empty/missing value:

      * network-legacy: `dhcp`
      * network-manager: `auto` ?

auto means dhcp in NM, so those are equivalent.

    * supports combinations, separated by comma

      * network-legacy: yes
      * network-manager: only subsets
  * **N/A**:

    * `auto6` (implemented as an alias of `dhcp6`)
    * `either6`

NM supports both auto6 and dhcp6 and they both mean to use IPv6 autoconf (SLAAC), and start DHCPv6 if the RA includes the M or O bits. DHCPv6 can only provide a /128 address without routes, so it's not clear that DHCPv6 alone (without autoconf) is useful in any real scenario.

    * `single-dhcp` (implemented as an alias of `dhcp`)

Right, this is missing in NM.

* `rd.neednet=1`

  * **N/A**:

    * Add failure mode to `nm-initrd-generator` for invalid input (https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/510)

rd.neednet=1 is supported by NM. The issue is about improving error handling, which according to the issue description is not consistent even with the legacy module.

* `team=<teammaster>:<teamslaves>[:<teamrunner>]`

  * **N/A**:

    * teamrunner (https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/774)

Right.

* `rd.net.timeout.iflink=<seconds>`

  * **N/A**

* `rd.net.timeout.ifup=<seconds>`

  * **N/A**

* `rd.net.timeout.route=<seconds>`

  * **N/A**

This doesn't seem used by the legacy module.

* `rd.net.timeout.ipv6dad=<seconds>`

  * **N/A**

* `rd.net.timeout.ipv6auto=<seconds>`

  * **N/A**

In general, about rd.net.timeout.* options, we add them to the NM module when there is a specific request, because it's not clear how they are all needed.

* `rd.net.timeout.carrier=<seconds>`

  * ok

* `rd.iscsi.ibft`

  * ok

* `rd.iscsi.mp`

  * **N/A**

* `rd.znet=<nettype>,<subchannels>,<options>`

  * ok

* `rd.znet_ifname=<ifname>:<subchannels>`

  * ok
aafeijoo-suse commented 1 year ago

Thanks for your feedback.

* `rd.neednet=1`

  * **N/A**:

    * Add failure mode to `nm-initrd-generator` for invalid input (https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/510)

rd.neednet=1 is supported by NM. The issue is about improving error handling, which according to the issue description is not consistent even with the legacy module.

Sorry, I expressed badly, I wanted to highlight only the error handling. And you're right, I didn't realize the legacy module doesn't implement it either.

* `rd.net.timeout.iflink=<seconds>`

  * **N/A**

* `rd.net.timeout.ifup=<seconds>`

  * **N/A**

* `rd.net.timeout.route=<seconds>`

  * **N/A**

This doesn't seem used by the legacy module.

* `rd.net.timeout.ipv6dad=<seconds>`

  * **N/A**

* `rd.net.timeout.ipv6auto=<seconds>`

  * **N/A**

In general, about rd.net.timeout.* options, we add them to the NM module when there is a specific request, because it's not clear how they are all needed.

These timeout options are queried in functions defined within the net-lib.sh script (40network), which are called from some scripts of the legacy module. But I'm not sure if they are really needed.

LaszloGombos commented 1 year ago

There is some evidence, that network-manager tests run slower and/or less reliable than the same tests with network-legacy.

One example would be this run https://github.com/dracutdevs/dracut/actions/runs/3526738099/jobs/5915011292

Tests 20 and 50 are executed with NM=0 - they passed (in 30 min and in 17 min runs). Tests 21 and 51 are executed with NM=1 - they timed out (after 45 minutes).