Skip to content

Stage the definitions and run sysupdate once - #81

Open
pothos wants to merge 2 commits into
mainfrom
sysupdate-rework
Open

pothos wants to merge 2 commits into
mainfrom
sysupdate-rework

Conversation

@pothos

@pothos pothos commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

This reworks how we run sysupdate, bringing it closer to the varlink-socket-transfer file model. Instead of writing the transfer files to /etc, we scope the transfer files for a unit run through bind mounts. Also, we don't iterate over components from quarry but do one sysupdate run.

@pothos
pothos force-pushed the barerepo-hardhat-helpers-sysupdate-rework branch 3 times, most recently from 62f1853 to 4eea4b8 Compare October 27, 2026 02:07
@pothos
pothos force-pushed the barerepo-hardhat-helpers-sysupdate-rework branch from 4eea4b8 to caf44b5 Compare October 27, 2026 10:19
@cyphar
cyphar force-pushed the barerepo-hardhat-helpers-sysupdate-rework branch 2 times, most recently from b958fa3 to b1cfaa9 Compare October 29, 2026 09:21
@pothos
pothos changed the base branch from barerepo-hardhat-helpers-sysupdate-rework to main November 3, 2026 07:52
Before each update pass, quarry-sysupdate started
systemd-sysupdate-auto-enable.service so that sysupdate would enable the
components and features suggested for the current machine tags. The
model leaked state and thus could not disable a component or feature
again.

Drop the call and for now let quarry-sysupdate decide the enablement
itself from the definitions and the machine tags when it stages them for
the update run, which follows in the next commit. Later sysupdate should
get a direct condition that avoids this indirection.

Signed-off-by: Kai Lüke <kai@amutable.com>
quarry-sysupdate installed the repository's sysupdate definitions as
symlinks in /etc and ran systemd-sysupdate once per component. That left
state in /etc which had to be reverted on failure, a crash could leave
the host with half-replaced definitions, and enablement depended on the
masked auto-enable service.

The definitions of each component are now staged in quarry-sysupdate's
store, with the [Source] Path= pointed at the local proxy, and bound
read-only into /run for a single transient systemd-sysupdate
--component-all update run, so /etc stays untouched. quarry-sysupdate
decides the enablement itself. A component is enabled unless its
component file says Enabled=false. A disabled component or feature gets
Enabled=true stamped in when its SuggestOnMachineTag= conditions hold
for the machine's tags, evaluated as systemd does. The loop that runs
another update pass when a refreshed confext changed the machine tags
is kept. Each pass fetches the tags from hostnamed, stages the
definitions with them and does a full --component-all run. Before the
update has started, a failure aborts the extensions, which removes the
staging.

Signed-off-by: Kai Lüke <kai@amutable.com>
@pothos

pothos commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

This is a first step towards using the varlink endpoint which would rework the relation to quarry-sysupdate not calling out to sysupdate but being called through the varlink interface. (And once that is done a next step would be to generate UAPI.16 from the proxy.)

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.

1 participant