Skip to content

Tolerate a missing datacenter.cfg in vm_keyboard_default - #124

Merged
MickLesk merged 1 commit into
mainfrom
fix/keyboard-default-no-datacenter-cfg
Oct 8, 2026
Merged

MickLesk merged 1 commit into
mainfrom
fix/keyboard-default-no-datacenter-cfg

Conversation

@MickLesk

@MickLesk MickLesk commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Since #120 vm_keyboard_default pipes sed over /etc/pve/datacenter.cfg. Without the file the pipeline exits 2 and, under pipefail + inherit_errexit, aborts vm_echo_default_settings and vm_mark_created. The DevScripts VM-wizard CI (mocked host, no datacenter.cfg) has been red since. Guard the read; test added.

sed exits 2 when the file is absent; with pipefail and inherit_errexit that
killed vm_echo_default_settings and vm_mark_created on hosts and CI mocks
without one.
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Try this branch

The engine and the scripts resolve independently, so a production script can
be run against the engine from this PR by setting one variable:

COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/community-scripts/core/fix/keyboard-default-no-datacenter-cfg \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)"

Swap ct/debian.sh for whatever exercises the change.

This PR touches pve/, so it needs a Proxmox VE host.

Run a script from a fork as well
curl -fsSL https://raw.githubusercontent.com/community-scripts/core/fix/keyboard-default-no-datacenter-cfg/tools/run.sh |
  bash -s -- https://raw.githubusercontent.com/YOU/DevScripts/your-branch ct/debian.sh \
             https://raw.githubusercontent.com/community-scripts/core/fix/keyboard-default-no-datacenter-cfg

Note that run.sh is reached through a pipe, so the script it starts inherits
an exhausted stdin. Whiptail is fine — it opens /dev/tty — but a plain read
would see EOF. The single-variable form above does not have that problem.

Useful flags while testing

dev_mode=net logs every engine fetch with status and duration, which is the
quickest way to confirm the branch is really being used. dev_mode=keep stops a
failed build from deleting the container along with the evidence.

@MickLesk
MickLesk merged commit 7f7d6d0 into main Oct 8, 2026
4 checks passed
@github-actions
github-actions Bot deleted the fix/keyboard-default-no-datacenter-cfg branch October 9, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant