Skip to content

install: Reject the composefs backend on an existing ostree system - #26

Draft
cgwalters-bot wants to merge 2 commits into
mainfrom
bot/ostree-to-composefs-error
Draft

cgwalters-bot wants to merge 2 commits into
mainfrom
bot/ostree-to-composefs-error

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

bootc install to-existing-root --composefs-backend on an ostree-booted host currently empties /boot and the ESP before failing, which can leave the host unbootable. This makes it fail up front, before anything is modified, with an error pointing at bootc-dev#2079. That is the first step towards in-place ostree to composefs migration. The check keys off ostree/repo (composefs systems only have a stub ostree/), also covers images that force the composefs backend, and skips --replace=wipe.

A new tmt test (plan-54-install-composefs-on-ostree) runs the install on an ostree-booted VM, checks for the error and an unchanged /boot, then reboots and checks that the same ostree deployment is still booted. Once migration is implemented, it becomes the positive test.

Rebased onto main b06e0b0 (after bootc-dev#2483 and the bootc-dev#2508 docs restructure); the rebase was clean, and the experimental-composefs.md edit now lives in bootc-experimental-composefs.7.md.

Tested at 6a84299 on a 16-core devspace (cgwalters-devspace-36601734885, CentOS Stream 10 base):

  • just validate passed, and just unit-tests passed 466 tests (including the new test_ensure_composefs_target_not_ostree).
  • just test-tmt plan-54-install-composefs-on-ostree (ostree variant) passed, including the post-reboot checks.
  • Before the rebase, as a control, the same test on unpatched main (only the test commit applied) failed: the install got past the point of the new check and errored with Creating composefs directory: Read-only file system (os error 30) instead.

Related: bootc-dev#2079

Generated-by: https://github.com/cgwalters/#llms


Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.

  • Upstream: bootc-dev/bootc, base main
  • Board item: PVTI_lADOE9oHIs4BlJLczg9kESc
  • Fork CI: off; the devspace testing described above is this PR's CI, and upstream CI runs once it is opened there

To review:

  • Approve, or comment /promote on a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.
  • If upstream requires DCO, approving also signs off: promote adds Signed-off-by: Colin Walters <[email protected]> to the commits lacking it (the bot's and yours; anyone else's only if you ask), with you as committer.
  • Add a /draft line (in the same comment or before) to open it upstream as a draft (/ready undoes that).
  • Close to drop it.
  • Edit the title and description freely: they become the upstream PR's. Review comments are squashed into the commits they concern, with a reply here.

Running `bootc install to-existing-root --composefs-backend` on an
ostree-booted host isn't supported, but nothing stopped it: bootc went
ahead, emptied /boot (including the ostree kernels and initramfs) and
the ESP, and only then tried to set up composefs, which can leave the
host unbootable.

Fail right after gathering install state, before anything is modified,
with an error that says nothing was changed and what to do instead. The
check keys off `ostree/repo` in the physical root rather than the
`ostree/` directory, since composefs systems carry a stub `ostree/` too
and composefs-on-composefs alongside installs must not be blocked by
this. It also covers images that force the composefs backend (UKIs)
without the flag. `--replace=wipe` is left alone, as it removes the
ostree repository anyway.

This is the first step for in-place ostree to composefs migration.

Related: bootc-dev#2079
Generated-by: AI
Nothing in CI ran the composefs backend against an ostree-booted host,
which is how the destructive half-install went unnoticed. Cover it on
the ostree variant: the install must fail with the new error, leave
/boot untouched, and the host must still boot the same ostree
deployment after a reboot. Once in-place migration is implemented this
test turns into the positive case.

Related: bootc-dev#2079
Generated-by: AI
@cgwalters-bot

cgwalters-bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

✅ dispatch ended well. Result: #26

@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Moved to draft so this idle pull request stops holding other work through file overlap. Nothing else changed, and it can be marked ready again when review resumes.

Generated-by: https://github.com/cgwalters/#llms

@cgwalters-bot cgwalters-bot added the needs-human The poll stopped here; a person decides what is next label Nov 1, 2026
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

The poll stopped following this pull request: a draft with no checkpoint; mark it ready if the work is complete. It is labelled needs-human; remove the label to have the poll start again on it, with fresh fix rounds.

Generated-by: https://github.com/cgwalters/#llms

@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

/review

@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Triage verdict: release (operator's standing rule, tracker#1445)

Review/deliver narrow early-error/test slice, not full migration.

Generated-by: https://github.com/cgwalters/#llms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:deep Bot draft that needs a real review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant