Repository navigation
Description
Summary
State overlays work on the ostree backend and not on the composefs backend. It would be good to support them there, at least in the unsealed configuration, and to add them to the known issues list in bootc-composefs.7.md until then.
When the composefs-native backend was planned, #1190 listed the state overlay docs among ostree-era features the composefs path would need to keep honoring (#1190 (comment)). The backend is now stable, but state overlays are not on its parity list, have no tracking issue, and are silently skipped (ostreedev/ostree#3691).
The use case
Many third-party host agents, especially security agents, install into /opt/<vendor> and write there at runtime: binaries, version symlinks, enrollment identity, and vendor-delivered content in one tree the vendor will not restructure. Two patterns:
- State and binaries mixed under
/opt. A writable directory whose binaries still come from the image. Add concept of state overlays ostreedev/ostree#3120 named this case: software in/opt"often mixes code and state".ostree admin state-overlayfails on bootc-managed systems ostreedev/ostree#3553 was filed by someone doing this for a vulnerability scanner agent. - In-place self-updaters. The agent's management plane pushes new files into its install directory (Overlay state but unique to each deployment #2468 asked for a variant of this). State overlays do not make those updates permanent (the image wins at the next deployment change), but the agent runs and keeps its state.
Why state overlays and not the alternatives
- The image stays the authority. At every deployment change, upper entries that shadow image content are pruned; only files the image does not ship, such as machine identity, are kept. Rollback gives a coherent pair: binaries roll back, identity stays.
- Relocating the tree to
/varis what people do instead, and it is worse. Image content under/varis applied at install only, so the binaries freeze while the OS moves, and rollback cannot resynchronize them.bootc container lintalready flags it. At least one vendor's published bootc recipe does it (https://github.com/CrowdStrike/falcon-bootc). - It is also simpler for the user. That recipe has to move the tree into
/var/opt, symlink it back, and on RHEL 9 addsemanage fcontextrules so the moved binaries and libraries get the labels they would have had under/opt. A state overlay is onesystemctl enableline: no relocation, no symlinks, no relabeling of the vendor's files, and the vendor's paths stay where it expects them. - Splitting state into
/varshould stay the first recommendation, but only works when the writable paths can be separated from the binaries. - A container is best where the vendor ships one, but most security agents are host installs, and logically bound images are not on this backend either (install: logically bound images are not installed with --composefs-backend #2540).
Without state overlays, the composefs backend leaves these users the /var relocation, the least image-governed option. That matters more over time: upstream plans in-place moves from ostree to this backend, and #1190 framed it as a step toward phasing out ostree.
Suggested scope
- Unsealed composefs backend: there is no integrity reason to exclude a writable overlay, so the ask is parity with the ostree backend, with the same semantics users rely on today: state written in the directory persists across reboots, content shipped in the image wins when the deployment changes, and rollback behaves the same way. How to build it is up to maintainers, however best fits the composefs root setup.
- Sealed (fs-verity) configuration: a writable overlay over measured content may be out of scope by design, as On composefs, with fsverity, enabling usroverlay breaks the system #2507 proposes for
usr-overlay. If so, please say so inbootc-composefs.7.mdrather than leaving a silent no-op.
Naming
A composefs-native implementation is a natural point to adopt a backend-neutral unit name: [email protected], or [email protected] if an unprefixed name is a concern. Keep ostree-state-overlay@ as an alias so existing images keep working, and use scoped examples (@opt-myvendor, not @opt) in the docs.
Known rough edges, not blockers
No way to see what the overlay holds or what a prune removed (a notice journal line would help; asked in the ostreedev/ostree#3120 review). The merged directory takes mode 0700 and label var_t from the upper, so non-root services cannot read it, and new files in it are labeled var_t. Docs show only the unscoped @opt.service. No state overlay tests in bootc (ostree has one); see also #1925.
Related
- [email protected] is silently skipped on bootc's composefs backend; it should fail visibly ostreedev/ostree#3691: fail visibly instead of skipping on this backend.
- bootc composefs-native backend #1190, install: logically bound images are not installed with --composefs-backend #2540, On composefs, with fsverity, enabling usroverlay breaks the system #2507, Overlay state but unique to each deployment #2468, No longer able to enable state overlay #1925, Add concept of state overlays ostreedev/ostree#3120.
Activity
jmarrero commentedon Nov 13, 2026
We talked about this in the community meeting, we are going to initially at least provide parity with ostree on the composefs backend.
We need to decide still how we are going to surface this via the bootc cli/status.
Johan-Liebert1 commentedon Nov 16, 2026
I can pick this up
we can do it similarly to how we show usr overlay status
composefs: Check if secure boot is enabled