Skip to content

support deploying a composefs directlyΒ #3291

Open
@cgwalters

Description

ostree has two major parts:

  • OstreeRepo (object store, commits)
  • OstreeSysroot (has-a OstreeRepo, extends with bootloader support, deployments, etc.)

As part of containers/bootc#20 and https://github.com/cgwalters/composefs-oci what would be quite helpful as an intermediate step is if we could try to sever some of the dependencies of OstreeSysroot on OstreeRepo.

cfs-repo-in-ostree-repo

Let's introduce an opinionated "composefs repo" inside an ostree repo, something like cfs which would have its own cfs/objects named by verity digest.

commit stub β†’ composefs

Specifically: I'd like to be able to pass a composefs blob to ostree_sysroot_deploy_tree instead of an ostree commit. In practice of course, we have a lot of things that refer to commits, and making them effectively take:

enum Source {
  OstreeCommit(digest)
  Composefs(name?)
}

would probably be quite invasive. A practical though brutal hack would be making up a stub/empty commit that has a metadata entry that points to a composefs. This would mean things like ostree diff would just break (or really: be nonfunctional)...which is probably fine! As long as we get far enough that one of these things can just go through the deployment path I think we're good.

GC

There's some more work for sure here too around things like generate_deployment_refs() ...we just skip that I think in this case and require the caller to do GC?

Filesystem mapping

We'd retain support for stateroots and etc merging. A deployment would contain 1-2 things:

  • <name>.cfs -
  • etc/ - if transient etc is not in use, this would be the merge source

IOW we'd have /ostree/deploy/$stateroot/composefs/<name>.cfs or so.

Prepare root

Simplest is to retain the ostree= karg, but honestly it's a bit more tempting to force this into a locally generated initramfs extension, basically go all in on "composefs digest+path in initramfs".

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions