curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #04215
Re: [Merge] ~ogayot/curtin:nvme-o-tcp-dracut-target into curtin:master
Diff comments:
> diff --git a/curtin/commands/curthooks.py b/curtin/commands/curthooks.py
> index a31ef41..0334402 100644
> --- a/curtin/commands/curthooks.py
> +++ b/curtin/commands/curthooks.py
> @@ -1655,12 +1655,20 @@ def configure_mdadm(cfg, state_etcd, target, osfamily=DISTROS.debian):
>
>
> def configure_nvme_over_tcp(cfg, target: pathlib.Path) -> None:
> - """If any NVMe controller using the TCP transport is present in the storage
> - configuration, create a nvme-stas configuration and configure the initramfs
> - so that the remote drives can be made available at boot.
> - Please note that the NVMe over TCP support in curtin is experimental and in
> - active development. Currently, it only works with trivial network
> - configurations ; supplied by Subiquity."""
> + '''If any NVMe controller using the TCP transport is present in the storage
You're right, there's no way to explicitly configure which implementation is used. I'll add a note to clarify. Thanks for the suggestion.
> + configuration, configure the target system in such a way that makes booting
> + possible. We have three different implementations which come with different
> + requirements and limitations:
> + 1. an implementation that leans on firmware support which makes it possible
> + to boot with no local storage at all. This only works with dracut and leans
> + on the nvmf module.
> + 2. one that does not require firmware support but can still be used if the
> + kernel and initramfs are located on local storage. This works with dracut
> + and initramfs-tools.
> + 3. a user-space implementation (using nvme-stas) that only works if all
> + essential filesystems are located on remote storage.
> + '''
> +
> controllers = nvme_tcp.get_nvme_stas_controller_directives(cfg)
>
> if not controllers:
> diff --git a/curtin/nvme_tcp.py b/curtin/nvme_tcp.py
> index b7cfdc5..a285e09 100644
> --- a/curtin/nvme_tcp.py
> +++ b/curtin/nvme_tcp.py
> @@ -404,3 +493,26 @@ def dracut_adapt_netplan_config(cfg, *, target: pathlib.Path):
>
> if modified:
> netplan_conf_path.write_text(yaml.dump(config))
> +
> +
> +def prevent_initramfs_tools_reinstallation(target: pathlib.Path) -> None:
> + '''Ensure that initramfs-tools does not get reinstalled over dracut, using
> + APT pinning.'''
> + # intel-microcode on 24.04 (pulled by linux-generic) is known to have
> + # initramfs-tools as a recommends. LP: #2073125
> + preferences_d = target / 'etc/apt/preferences.d'
> + preferences_d.mkdir(parents=True, exist_ok=True)
> + (preferences_d / 'nvmeotcp-poc-initramfs').write_text('''\
> +# The NVMe/TCP proof of concept on Ubuntu uses dracut instead of
> +# initramfs-tools.
> +# That said, dracut is a universe package and is not the supported tool for
Absolutely, thanks!
> +# initramfs management. Installing packages that explicitly depend on
> +# initramfs-tools will cause dracut to be removed, making the system unable to
> +# boot. Furthermore, installing packages that have initramfs-tools as a
> +# recommends can also trigger removal of dracut. Let's make sure
> +# initramfs-tools does not get installed. See LP: #2073125.
> +
> +Package: initramfs-tools
> +Pin: version *
> +Pin-Priority: -1
> +''')
--
https://code.launchpad.net/~ogayot/curtin/+git/curtin/+merge/494693
Your team curtin developers is subscribed to branch curtin:master.
References