diff --git a/docs/changelog.md b/docs/changelog.md index cf9a050e..ad632ed8 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,20 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-16 +- **No clone of template 901 puts its user in `lxd`.** A second live + re-check of `eden` found `garnet` in the `lxd` group, from the default + user groups in Ubuntu's `/etc/cloud/cloud.cfg`. LXD is not installed on + any clone, so it granted nothing, but it was not chosen. `garnet` was taken + out of the group on `eden`, and `eden`'s `cloud.cfg` edited to match. The + Ubuntu build now removes `lxd` from those groups after its upgrade and + fails if it is still there. `cloud.cfg` is a conffile, so unattended + upgrades keep the change; a hand-run `apt full-upgrade` asks before + replacing it. Not built yet: 901 has it from its next Ubuntu build. The + same check found 915 MB of linter images, pulled to `eden` by this day's + `lint.sh` runs through its Docker fallback, and two empty anonymous Postgres + volumes from the 2026-11-14 `make validate`. Both were removed. Every + audit finding held on the box after the 09:36 reboot. + - **Template 901 is rebuilt without `autoinstall` on its kernel line.** This completes *Template 901 takes `autoinstall` off the kernel line* below, which left it not built. The Ubuntu build ran from `phoenix` on main after diff --git a/docs/runbooks/build-the-lab-templates.md b/docs/runbooks/build-the-lab-templates.md index 27fed6b8..92188091 100644 --- a/docs/runbooks/build-the-lab-templates.md +++ b/docs/runbooks/build-the-lab-templates.md @@ -367,9 +367,10 @@ What each one does, so a stall can be placed: `packer` with `phoenix`'s key. `packer/ubuntu/prune.sh` purges the server seed's services no clone uses (VMware tools, ModemManager, snapd, thermald, multipath, iSCSI, kdump, udisks2), takes the installer's - `autoinstall` off the kernel line, and fails the build if any of that is left. Packer then upgrades, turns off X11 forwarding, and wipes - cloud-init's state, machine-id and host keys. It then deletes the `packer` - user. + `autoinstall` off the kernel line, and fails the build if any of that is + left. Packer then upgrades, turns off X11 forwarding, takes `lxd` out of + cloud-init's default user groups, and wipes cloud-init's state, machine-id + and host keys. It then deletes the `packer` user. - **Fedora** picks "Install Fedora" from the GRUB menu, whose default is the media check. Anaconda finds `ks.cfg` on the `OEMDRV` disc by itself, installs Server unattended in text mode, and reboots. The rest is diff --git a/packer/ubuntu.pkr.hcl b/packer/ubuntu.pkr.hcl index adadc276..72cb9247 100644 --- a/packer/ubuntu.pkr.hcl +++ b/packer/ubuntu.pkr.hcl @@ -142,6 +142,12 @@ build { # display. sshd takes the first value it reads, and the drop-ins are # included before the main file's line, so this wins. "printf 'X11Forwarding no\\n' > /etc/ssh/sshd_config.d/10-no-x11.conf", + # cloud-init gives the clone's user Ubuntu's default groups, lxd among + # them, and LXD is not installed on any clone. After the upgrade, so + # the upgrade cannot put it back; cloud.cfg is a conffile, and + # unattended-upgrades keeps a changed one. + "sed -i '/^ *groups: \\[/s/, lxd//' /etc/cloud/cloud.cfg", + "if grep -qE '^ *groups: .*lxd' /etc/cloud/cloud.cfg; then echo 'lxd is still in cloud.cfg default groups' >&2; exit 1; fi", "cloud-init clean --logs --machine-id", ] }