You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support path-triggering when using composefs backend #2119
We have a collection of systemd units that trigger on modification of /ostree/bootc today when using the ostree backend. Most notably this triggers rhsm facts generation whenever deployments are changed, either while modifying a running system or when the deployments change during boot (booted becomes rollback, staged becomes booted).
We don't handle that at all with the composefs backend currently, so we'll need to (1) add the code in the right place to update the mtime on the composefs storage root, and (2) update the systemd unit(s), I am pretty sure this is simply adding an extra PathChanged line to the .path unit and everything else should continue functioning the same.
Sounds reasonable to me though another idea here - what if we just always initialize a composefs repo - even if empty - and change its mtime when we make changes too?
I think the thing we need to be careful about is avoiding a situation where (1) we have both ostree and composefs repos present, (2) we update the mtime code to always update both, and (3) we have the path unit watching both. I am assuming that would end up firing the path unit twice and that's just asking for things to race and go wrong.
It makes sense to optimize but consumers already have to be ready for successive changes, right? I don't think it can race - the path unit acts as a serialization point, we aren't spawning mulitple things at once.
It makes sense to optimize but consumers already have to be ready for successive changes, right? I don't think it can race - the path unit acts as a serialization point, we aren't spawning mulitple things at once.
Yeah you're right, I tested it and it only triggers once:
jeckersb@burd:/var/tmp$ journalctl --user -f -u bootc-status-modified.target &
[1] 102617
jeckersb@burd:/var/tmp$ systemctl --user start bootc-status-modified.path
jeckersb@burd:/var/tmp$ systemctl --user status bootc-status-modified.path
● bootc-status-modified.path - Monitor bootc for status changes
Loaded: loaded (/var/home/jeckersb/.config/systemd/user/bootc-status-modified.path; disabled; preset: disabled)
Active: active (waiting) since Tue 2026-04-07 16:23:11 EDT; 16s ago
Invocation: d749fe36a2d444beb6e2cc6d691d6ecd
Triggers: ● bootc-status-modified.target
Apr 07 16:23:11 burd systemd[3086]: Started bootc-status-modified.path - Monitor bootc for status changes.
jeckersb@burd:/var/tmp$ cat ~/.config/systemd/user/bootc-status-modified.path
[Unit]
Description=Monitor bootc for status changes
[Path]
PathChanged=/var/tmp/path-test-a
PathChanged=/var/tmp/path-test-b
Unit=bootc-status-modified.target
[Install]
WantedBy=multi-user.target
jeckersb@burd:/var/tmp$ touch /var/tmp/path-test-a /var/tmp/path-test-b
jeckersb@burd:/var/tmp$ Apr 07 16:23:50 burd systemd[3086]: Reached target bootc-status-modified.target - Target for bootc status changes.
Apr 07 16:23:50 burd systemd[3086]: Stopped target bootc-status-modified.target - Target for bootc status changes.
jeckersb@burd:/var/tmp$ touch /var/tmp/path-test-a /var/tmp/path-test-b
jeckersb@burd:/var/tmp$ Apr 07 16:24:01 burd systemd[3086]: Reached target bootc-status-modified.target - Target for bootc status changes.
Apr 07 16:24:01 burd systemd[3086]: Stopped target bootc-status-modified.target - Target for bootc status changes.
One issue I'm seeing with always creating the composefs repo is that we need to make the determination of whether to require verity in said repo. Currently the composefs backend does that with --allow-missing-verity but that is a composefs-install-time option. If we're operating on an ostree-only system, either during a fresh install or on an existing system (for upgrade purposes we probably want to check and create the composefs repo on other mutating operations like upgrade), it's not obvious to me how we should handle that.
Activity
cgwalters commentedon Apr 6, 2026
Sounds reasonable to me though another idea here - what if we just always initialize a composefs repo - even if empty - and change its mtime when we make changes too?
jeckersb commentedon Apr 7, 2026
I think the thing we need to be careful about is avoiding a situation where (1) we have both ostree and composefs repos present, (2) we update the mtime code to always update both, and (3) we have the path unit watching both. I am assuming that would end up firing the path unit twice and that's just asking for things to race and go wrong.
cgwalters commentedon Apr 7, 2026
It makes sense to optimize but consumers already have to be ready for successive changes, right? I don't think it can race - the path unit acts as a serialization point, we aren't spawning mulitple things at once.
jeckersb commentedon Apr 7, 2026
Yeah you're right, I tested it and it only triggers once:
jeckersb commentedon Apr 7, 2026
One issue I'm seeing with always creating the composefs repo is that we need to make the determination of whether to require verity in said repo. Currently the composefs backend does that with
--allow-missing-veritybut that is a composefs-install-time option. If we're operating on an ostree-only system, either during a fresh install or on an existing system (for upgrade purposes we probably want to check and create the composefs repo on other mutating operations likeupgrade), it's not obvious to me how we should handle that.cgwalters commentedon Apr 7, 2026
I think detect if fsverity is supported, if so we opt in to enabling it by default?
--allow-missing-veritywe discussed extensively IIRC in another PR and I think it wasn't useful