Skip to content

feat(packer): Ubuntu template keeps clones' users out of lxd - #1537

Merged
Gerrrt merged 1 commit into
mainfrom
packer/ubuntu-no-lxd-group
Nov 16, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
packer/ubuntu-no-lxd-group

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 16, 2026

Copy link
Copy Markdown
Owner

What changed

On eden, by hand: garnet was taken out of lxd and cloud.cfg was edited to match. I also removed 915 MB of linter images and two orphan anonymous volumes.

Why

A second live re-check of eden found garnet in lxd. That membership comes from Ubuntu's cloud-init defaults. LXD is not installed on any clone, so it granted nothing, but nobody chose it. Every other audit finding held after the reboot.

Blast radius

  • Template 901's next build: users that cloud-init creates on later clones are no longer in lxd.

  • Existing clones keep the membership until it is removed by hand.

  • cloud.cfg is a conffile. Unattended upgrades keep the edit; a hand-run apt full-upgrade prompts before replacing it.

  • No change to network segmentation or firewall rules

  • No new port published to a VLAN that could not already reach the service

  • No credential added outside secrets/*.sops.yaml

Verification

  • On a copy of eden's cloud.cfg, the sed turns groups: [adm, cdrom, dip, lxd, sudo] into [adm, cdrom, dip, sudo]. The check passes on the edited file and fails on the unedited one.

  • id garnet on eden no longer lists lxd.

  • ./scripts/lint.sh: passed, packer validate included. yamllint, ruff (×2) and ansible-lint were skipped on eden. python3 scripts/check_docs.py is OK.

  • Not built yet: 901 picks this up at its next Ubuntu build.

  • make validate passes

  • Deployed to the lab and confirmed working

  • Docs updated (docs/, service README, or docs/roadmap.md)

🤖 Generated with Claude Code

cloud-init's default user groups in Ubuntu's cloud.cfg include lxd, and no
clone installs LXD. The build drops it after the upgrade and fails if it
is left. Found by a second live re-check of eden, where garnet was taken
out of the group by hand; the same check removed linter images and orphan
volumes this day's work had left there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 11:03
@Gerrrt
Gerrrt enabled auto-merge (squash) November 16, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the change removing default lxd membership from future Ubuntu template clones.

No open issues 🎉

What changed in this PR

Updates the Ubuntu template build so future clones no longer receive lxd membership through cloud-init’s default user groups. The change takes effect after template 901 is rebuilt; existing clones require manual cleanup.

Changes:

  • Removes lxd from cloud-init’s default groups after the upgrade and fails the build if it remains.
  • Updates the template runbook to describe the new step.
  • Records the template change and manual cleanup performed on eden.
File Description
packer/​ubuntu.pkr.hcl Removes default lxd membership and adds a build-time check.
docs/​runbooks/​build-the-lab-templates.md Documents the group-removal step and rewraps the build description.
docs/​changelog.md Records the change, pending rebuild, and eden cleanup.

Review effort: Balanced

@Gerrrt
Gerrrt disabled auto-merge November 16, 2026 11:12
@Gerrrt
Gerrrt merged commit 1035410 into main Nov 16, 2026
9 checks passed
@Gerrrt
Gerrrt deleted the packer/ubuntu-no-lxd-group branch November 16, 2026 11:12
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.

2 participants