From 9af4b0bfecc1fe1bd98dec1e234cabc495dba5b6 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Fri, 10 Mar 2023 05:57:36 -0700 Subject: config: Update grub-dpkg docs (#2058) Co-authored-by: s-makin --- cloudinit/config/cc_grub_dpkg.py | 5 ++--- cloudinit/config/schemas/schema-cloud-config-v1.json | 3 ++- tests/unittests/config/test_cc_grub_dpkg.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cloudinit/config/cc_grub_dpkg.py b/cloudinit/config/cc_grub_dpkg.py index bf8f6b65..2e0e671e 100644 --- a/cloudinit/config/cc_grub_dpkg.py +++ b/cloudinit/config/cc_grub_dpkg.py @@ -22,9 +22,8 @@ from cloudinit.subp import ProcessExecutionError MODULE_DESCRIPTION = """\ Configure which device is used as the target for grub installation. This module can be enabled/disabled using the ``enabled`` config key in the ``grub_dpkg`` -config dict. The global config key ``grub-dpkg`` is an alias for ``grub_dpkg``. -If no installation device is specified this module will execute grub-probe to -determine which disk the /boot directory is associated with. +config dict. This module automatically selects a disk using ``grub-probe`` if +no installation device is specified. The value which is placed into the debconf database is in the format which the grub postinstall script expects. Normally, this is a /dev/disk/by-id/ value, diff --git a/cloudinit/config/schemas/schema-cloud-config-v1.json b/cloudinit/config/schemas/schema-cloud-config-v1.json index 4af89d15..2a2d8631 100644 --- a/cloudinit/config/schemas/schema-cloud-config-v1.json +++ b/cloudinit/config/schemas/schema-cloud-config-v1.json @@ -1343,7 +1343,7 @@ "description": "Device to use as target for grub installation. If unspecified, ``grub-probe`` of ``/boot`` will be used to find the device" }, "grub-pc/install_devices_empty": { - "description": "Sets values for ``grub-pc/install_devices_empty``. If unspecified, will be set to ``true`` if ``grub-pc/install_devices`` is empty, otherwise ``false``.", + "description": "Sets values for ``grub-pc/install_devices_empty``. If unspecified, will be set to ``true`` if ``grub-pc/install_devices`` is empty, otherwise ``false``", "oneOf": [ { "type": "boolean" @@ -1364,6 +1364,7 @@ }, "grub-dpkg": { "type": "object", + "description": "An alias for ``grub_dpkg``", "deprecated": true, "deprecated_version": "22.2", "deprecated_description": "Use ``grub_dpkg`` instead." diff --git a/tests/unittests/config/test_cc_grub_dpkg.py b/tests/unittests/config/test_cc_grub_dpkg.py index 89f58bdc..189b674b 100644 --- a/tests/unittests/config/test_cc_grub_dpkg.py +++ b/tests/unittests/config/test_cc_grub_dpkg.py @@ -298,8 +298,8 @@ class TestGrubDpkgSchema: pytest.raises( SchemaValidationError, match=( - "Cloud config schema deprecations: grub-dpkg:" - " Deprecated in version 22.2. Use " + "Cloud config schema deprecations: grub-dpkg: An alias" + " for ``grub_dpkg`` Deprecated in version 22.2. Use " "``grub_dpkg`` instead." ), ), -- cgit v1.2.1