composefs backend: support state overlays (writable, image-reconciled subdirectories)
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- linux, rust
调研方向
Start by reading the composefs backend implementation and the existing ostree state overlay behavior; the issue links ostreedev/ostree#3691 and bootc-dev/bootc#1190 for context. Check how the composefs root is assembled and where bootc-composefs.7.md documents known issues. Done means unsealed state overlays have the stated persistence, deployment reconciliation, and rollback behavior, with sealed behavior documented if unsupported.
由索引模型根据 Issue 内容生成。
描述
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, bootc-dev/bootc#1190 listed the state overlay docs among ostree-era features the composefs path would need to keep honoring (https://github.com/bootc-dev/bootc/issues/1190#issuecomment-2714380763). 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. ostreedev/ostree#3120 named this case: software in/opt"often mixes code and state". 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 (bootc-dev/bootc#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 (bootc-dev/bootc#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 bootc-dev/bootc#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 bootc-dev/bootc#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 bootc-dev/bootc#1925.
Related
- ostreedev/ostree#3691: fail visibly instead of skipping on this backend.
- bootc-dev/bootc#1190, bootc-dev/bootc#2540, bootc-dev/bootc#2507, bootc-dev/bootc#2468, bootc-dev/bootc#1925, ostreedev/ostree#3120.
- 主要语言
- Rust
- 星标
- 2.3k
- 派生
- 230
- 平均合并
- 2 天 11 小时
- 30 天内合并 PR
- 42
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bootc-dev/bootc 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
install: improve error message when systemd-boot is selected without composefs backend可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
维护者通常 2 天内回复
相似的 Issue
-
llm translation
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
documentation good first issue trivial
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo step可能已有人在做 @jgregoriorincon 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
opengeos/RustGIS#2621 · 1 条评论 ·
维护者通常 1 天内回复
-
good first issue web
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复