Description
Currently, bootc cannot be used on systems managed by rpm-ostree as soon as any rpm-ostree client-side features are enabled (e.g. package layering or initramfs regeneration). This makes it harder to migrate systems from one to the other. The replacement for package layering is building container images, but that requires changing workflows and assuming new responsibilities. Also, initramfs regeneration and kernel argument manipulations still require rpm-ostree today.
But also for OS maintainers of rpm-ostree-based variants, trying to migrate users from one to the other would be much less dramatic if there were a window of time when both were supported. It would allow moving to bootc for updates, without breaking users currently using layering. Notably in upstream communities like FCOS, Silverblue, and IoT where rpm-ostree is today very popular. To a lesser degree in downstream systems like OCP, where we have more control on the implementation details and are already working on a container-native replacement to some of the features backed by rpm-ostree for now but we definitely have instances of people doing rpm-ostree-specific things behind the MCO's back today.
Implementation-wise, I think we could have a bit like
[bootc]
deployer=rpm-ostree deploy
deployer-status=rpm-ostree status --booted --json
in the origin, which would tell bootc switch
/bootc upgrade
to run the command in the deployer
key instead of ostree_sysroot_stage_tree()
, passing the container ref as an argument (or the OSTree commit so that bootc is still in charge of the downloading and importing? basically force rpm-ostree to operate in offline mode). And bootc status
would add under the BootEntry
object a new key like deployer
containing the deployer command, and deployerStatus
containing the output of the command which is expected to return JSON (but obviously displayed as YAML by bootc
). The idea being that bootc status
still captures the rpm-ostree-specific state here.
rpm-ostree could also learn to look for the bootc
group in the origin and rpm-ostree upgrade
/rpm-ostree deploy
could tell the user to use bootc instead.
(Obviously this is structured in a way that doesn't actually require bootc to know anything about rpm-ostree and which could in theory be reused for other things that could be driving ostree today.)
Activity