Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable grub-dpkg by default #5840

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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