cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #06526
Re: [Merge] ~chad.smith/cloud-init:bug/1840080-ubuntu-drivers-emit-latelink-v2 into cloud-init:master
Implementation looks great. One suggestion on the template description.
Diff comments:
> diff --git a/cloudinit/config/cc_ubuntu_drivers.py b/cloudinit/config/cc_ubuntu_drivers.py
> index 4da34ee..fa3a2c0 100644
> --- a/cloudinit/config/cc_ubuntu_drivers.py
> +++ b/cloudinit/config/cc_ubuntu_drivers.py
> @@ -65,6 +66,32 @@ OLD_UBUNTU_DRIVERS_STDERR_NEEDLE = (
> __doc__ = get_schema_doc(schema) # Supplement python help()
>
>
> +# debconf template to allow cloud-init pre-configure the global debconf
# Use a debconf template to configure a global debconf variable (linux/nvidia/latelink)
# setting this to "true" allows the 'linux-restricted-modules' deb to accept the
# NVIDIA EULA and the package will automatically link the drivers to the running kernel.
> +# variable linux/nvidia/latelink to true, allowing linux-restricted-modules
> +# to accept the NVIDIA EULA and automatically link drivers to the running
> +# kernel.
> +# EOL_XENIAL: can then drop this script and use python3-debconf which is only
> +# available in Bionic and later. Can't use python3-debconf currently as it
> +# isn't in Xenial and doesn't yet support X_LOADTEMPLATEFILE debconf command.
> +
> +NVIDIA_DEBCONF_CONTENT = """\
> +Template: linux/nvidia/latelink
> +Type: boolean
> +Default: true
> +Description: Late-link NVIDIA kernel modules?
> + Enable this to link the NVIDIA kernel modules in cloud-init and
> + make them available for use.
> +"""
> +
> +NVIDIA_DRIVER_LATELINK_DEBCONF_SCRIPT = """\
> +#!/bin/sh
> +# Allow cloud-init to trigger EULA acceptance via registering a debconf
> +# template to set linux/nvidia/latelink true
> +. /usr/share/debconf/confmodule
> +db_x_loadtemplatefile "$1" cloud-init
> +"""
> +
> +
> def install_drivers(cfg, pkg_install_func):
> if not isinstance(cfg, dict):
> raise TypeError(
--
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/371546
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:bug/1840080-ubuntu-drivers-emit-latelink-v2 into cloud-init:master.
References