Repository navigation
feat(packer): bake the rescue and check units - #114
Conversation
Each VM gets osapi-rescue-boot.service, as osapi agent service install writes it, so a reboot rolls back each pending change of osapi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Standards review: changes requested (head 52f7c12).
Checked with no finding: commit subject (45 characters), |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Fixed in 2e75bc8: the unit is in the image ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added in f97dced: the template |
|
Standards review: approved (head f97dced). Both findings of the last review are fixed: the units are in the image ( One item outside this PR: its specs PR, osapi-io/specs#750, still says that |
Same as the template that osapi agent service install writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added Restart=on-failure to packer/osapi-rescue@.service, as in the osapi template: f279783. No recipe was run. |
Same templates as osapi agent service install writes: the rescue unit is Type=notify, and the check of a new config is a oneshot unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Standards re-review at ea050bb. Changes requested. The new Open items:
The label is |
|
Code review: approved (head ea050bb), already labeled. The change is the check template and |
|
Fixed both standards items: the title is now 45 characters (the squash commit takes it), and the description names the check template and Type=notify. |
|
Standards re-check at ea050bb. Approved. Both items are fixed. The title, which becomes the squash subject, has 45 characters. The description names the three units, specs#750 still says "two more units". That item is on specs#750, not on this PR. |
A VM that upgrades in place is never baked again, so it never got the units of packer/. lab_agent installs the three from the same files, so a bump and a deploy reach it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Code review: approved (head 83d795a), delta from ea050bb only. The three files ( |
|
Standards re-review at 83d795a. Changes requested: one item. The new tasks meet the rules:
Open: the description has I moved the label back to |
|
Standards re-check at 83d795a. Approved. The |
Specs: osapi-io/specs#750 and osapi-io/specs#757
The lab image bakes the three units that
osapi agent service installwrites for pending changes (osapi-io/osapi#1707), as it bakes the unit of the agent:packer/osapi-rescue-boot.service: a oneshot beforeosapi-agent.servicethat runsosapi agent rescue --all, so a reboot rolls back each pending change. The packer build installs it and enables it.packer/osapi-rescue@.service: the template unit of each pending change (osapi-rescue@<job>). It isType=notify: it reports ready only after it loads the job, and a stop from a confirm exits 0.packer/osapi-netplan-check@.service: a oneshot template that runsosapi agent rescue --check --job %i, so the validation of a netplan change runs as root.osapi starts the two templates by name. The lab agent runs as root, so the lab has no sudoers lines for them. A VM that upgrades in place, such as debian-lts, is never baked again, so the
lab_agentrole installs the same three files on each VM it runs on (owner root, mode 0644, a daemon reload when one changed, and the boot unit enabled). Thus a bump and a deploy both give them to an in-place VM.This needs
just deploy, which bakes new images, becausepacker/changed.just bumprefuses to run until then.Checks:
just testpasses (ansible-lint, packer fmt, md format). The lab run of osapi#1707 deploys these images and runs the integration tests on ubuntu-1, debian-1 and debian-lts.🤖 Generated with Claude Code