Repository navigation
feat(packer): Ubuntu template keeps clones' users out of lxd - #1537
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
🟢 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
lxdfrom 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
packer/ubuntu.pkr.hcl: after the upgrade, the build removeslxdfrom the default user groups in/etc/cloud/cloud.cfg, and fails if it is still there.build-the-lab-templates.md§4 says so. I also rewrapped that bullet, which fix(eden): drop autoinstall from the template's kernel line; correct the password record; finish #1443 #1534 had left with an overlong line.docs/changelog.mdrecords the change, and what a second live re-check ofedenfound and removed.On
eden, by hand:garnetwas taken out oflxdandcloud.cfgwas edited to match. I also removed 915 MB of linter images and two orphan anonymous volumes.Why
A second live re-check of
edenfoundgarnetinlxd. 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.cfgis a conffile. Unattended upgrades keep the edit; a hand-runapt full-upgradeprompts 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.yamlVerification
On a copy of
eden'scloud.cfg, thesedturnsgroups: [adm, cdrom, dip, lxd, sudo]into[adm, cdrom, dip, sudo]. The check passes on the edited file and fails on the unedited one.id garnetonedenno longer listslxd../scripts/lint.sh: passed,packer validateincluded. yamllint, ruff (×2) and ansible-lint were skipped oneden.python3 scripts/check_docs.pyis OK.Not built yet: 901 picks this up at its next Ubuntu build.
make validatepassesDeployed to the lab and confirmed working
Docs updated (
docs/, service README, ordocs/roadmap.md)🤖 Generated with Claude Code