Skip to content

leverage container-image-reference-digest from rpm-ostree for OCI updates #1272

@dustymabe

Description

@dustymabe

Was discussing with @jlebon and found out that once we have switched and are using OCI for updates we'll be in a position where the analog of sudo rpm-ostree rebase "fedora/${ARCH}/coreos/${STREAM}" won't really work.

i.e. if you sudo rpm-ostree rebase ostree-remote-image:fedora:registry:quay.io/fedora/fedora-coreos:stable then your zincati updates will break.

I think we need to still keep this working and I think we can. Enough information is in the rpm-ostree status --json output:

[core@cosa-devsh ~]$ rpm-ostree status --json | grep container-image
      "container-image-reference-digest" : "sha256:b5bdaa44a45084bf572c8c0f48d39c30b6c365941e86e60fcefb65aa9836ed9c",
      "container-image-reference" : "ostree-remote-image:fedora:docker://quay.io/fedora/fedora-coreos:rawhide",

So we have the container digest as well as the name we are following so we should be able to pull off the tag from what we are following and use the digest instead.

We could actually lean in to this strategy even more by relying on it in zincati by default (i.e. not just handling a corner case but making it part of the strategy), which would allow for more information to be shown to the user without having to leverage CustomOrigin:

i.e. this:

[core@cosa-devsh ~]$ rpm-ostree status 
State: idle
Deployments:
● ostree-remote-image:fedora:registry://quay.io/fedora/fedora-coreos:testing
                   Digest: sha256:b5bdaa44a45084bf572c8c0f48d39c30b6c365941e86e60fcefb65aa9836ed9c
                  Version: 43.20250303.dev.0 (2025-03-03T19:41:42Z)

versus:

[core@cosa-devsh ~]$ rpm-ostree status 
State: idle
Deployments:
● quay.io/fedora/fedora-coreos@sha256:b5bdaa44a45084bf572c8c0f48d39c30b6c365941e86e60fcefb65aa9836ed9c
             CustomOrigin: Fedora CoreOS testing stream
                  Version: 41.20250215.1.0 (2025-02-17T11:44:02Z)

It shows you what "stream" we are following along with the actual digest instead of relying on customOrigin.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions