Skip to content

Commit

Permalink
fix: disable grub-dpkg by default (#5840)
Browse files Browse the repository at this point in the history
cloud_style_initialization is now default
  • Loading branch information
holmanb authored Oct 27, 2024
1 parent a911b5e commit 4b56c5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cloudinit/config/cc_grub_dpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"id": "cc_grub_dpkg",
"distros": ["ubuntu", "debian"],
"frequency": PER_INSTANCE,
"activate_by_schema_keys": [],
"activate_by_schema_keys": ["grub_dpkg", "grub-dpkg"],
}

LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -115,7 +115,7 @@ def handle(name: str, cfg: Config, cloud: Cloud, args: list) -> None:
if not mycfg:
mycfg = {}

enabled = mycfg.get("enabled", True)
enabled = mycfg.get("enabled", False)
if util.is_false(enabled):
LOG.debug("%s disabled by config grub_dpkg/enabled=%s", name, enabled)
return
Expand Down
4 changes: 2 additions & 2 deletions cloudinit/config/schemas/schema-cloud-config-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1611,8 +1611,8 @@
"properties": {
"enabled": {
"type": "boolean",
"default": true,
"description": "Whether to configure which device is used as the target for grub installation. Default: ``true``."
"default": false,
"description": "Whether to configure which device is used as the target for grub installation. Default: ``false``."
},
"grub-pc/install_devices": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/config/test_cc_grub_dpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def test_handle(
"""Test setting of correct debconf database entries"""
m_is_efi_booted.return_value = is_uefi
m_fetch_idevs.return_value = fetch_idevs_output
cfg = {"grub_dpkg": {}}
cfg = {"grub_dpkg": {"enabled": True}}
if cfg_idevs is not None:
cfg["grub_dpkg"]["grub-pc/install_devices"] = cfg_idevs
if cfg_idevs_empty is not None:
Expand Down

0 comments on commit 4b56c5c

Please sign in to comment.