Commit 219c3a2
committed
Restore non-essential systemd unit cleanup for jammy warden
bosh-docker-cpi-release#60 moved the cleanup of non-essential systemd
units out of the Docker CPI and into the stemcell, on the basis that the
stemcell would mask anything that can't run in a container (resolving
bosh-docker-cpi-release#58 and #504). On the jammy line, only the
systemd-binfmt mask landed (#500); the rest of the CPI's allow-list was
never reproduced here.
As a result, warden stemcells started with exec /sbin/init now boot the
full stock systemd unit set. In a BOSH director the stock units contend
with the monit-managed bpm jobs and the director fails to converge (e.g.
the postgres role is never created). This regresses any consumer running
a Docker-CPI director on a jammy warden stemcell ≥ the build that pairs
with Docker CPI ≥ 0.2.9.
This restores the CPI's historical allow-list in base_warden, removing
the non-essential .wants entries at build time. It uses -delete (≡
systemctl disable) rather than mask, matching the CPI's original
semantics: units are dropped from the boot sequence but can still start
as dependencies of a kept unit. runit, ssh, dbus, journald, logrotate,
systemd-tmpfiles, systemd-user-sessions, and the bosh-agent are
preserved. Deriving the set at build time keeps it correct as the
package set changes.
Verified against ubuntu-jammy-stemcell:1.1250: 13 essential .wants
entries kept, ~75 non-essential removed. This is the same prune Docker
CPI 0.2.3 applied, which is green on cgroups-v1 workers. Adds a
warden_spec assertion that non-essential units are removed and essential
ones remain.
Related: bosh-docker-cpi-release#60, bosh-docker-cpi-release#58, #500,
ai-assisted=yes
[TNZ-88995]1 parent b034843 commit 219c3a2
2 files changed
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
61 | 87 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
0 commit comments