Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong imageref in a built qcow2 #69

Closed
ondrejbudai opened this issue Dec 20, 2023 · 4 comments
Closed

Wrong imageref in a built qcow2 #69

ondrejbudai opened this issue Dec 20, 2023 · 4 comments
Assignees
Labels
area/should-be-bootc Bugs that will be fixed when we switch to using bootc

Comments

@ondrejbudai
Copy link
Member

I built and booted my own qcow2:

sudo podman run \
    --rm \
    -it \
    --privileged \
    --pull=newer \
    --security-opt label=type:unconfined_t \
    -v $(pwd)/output:/output \
    quay.io/centos-bootc/bootc-image-builder:latest \
    --type qcow2 \
    ghcr.io/ondrejbudai/fedora-bootc:39

However, bootc update doesn't work because the image ref doesn't contain the tag:

$ sudo bootc update
ERROR Upgrading: Pulling: Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: reading manifest latest in ghcr.io/ondrejbudai/fedora-bootc: manifest unknown
$ sudo bootc status
note: The format of this API is not yet stable
apiVersion: org.containers.bootc/v1alpha1
kind: BootcHost
metadata:
  name: host
spec:
  image:
    image: ghcr.io/ondrejbudai/fedora-bootc
    transport: registry
    signature: !ostreeRemote ''
status:
  staged: null
  booted:
    image:
      image:
        image: ghcr.io/ondrejbudai/fedora-bootc <-- LOOK HERE
        transport: registry
        signature: !ostreeRemote ''
      version: 39.20231220.0
      timestamp: null
      imageDigest: sha256:bbb35d247de551d80e9828967114e0bf60de787f6650ee8019b499f0a5772fbe
    incompatible: false
    pinned: false
    ostree:
      checksum: 10d041accf6827df7091684aedbe38fe0685ca6191c768b7612c58eb581c4f03
      deploySerial: 0
  rollback: null
  isContainer: false

This issue can be fixed by running sudo bootc switch --no-signature-verification ghcr.io/ondrejbudai/fedora-bootc:39:

$ sudo bootc update
No changes in ostree-unverified-registry:ghcr.io/ondrejbudai/fedora-bootc:39 => sha256:bbb35d247de551d80e9828967114e0bf60de787f6650ee8019b499f0a5772fbe
Staged update present, not changed.
$ sudo bootc status
note: The format of this API is not yet stable
apiVersion: org.containers.bootc/v1alpha1
kind: BootcHost
metadata:
  name: host
spec:
  image:
    image: ghcr.io/ondrejbudai/fedora-bootc:39
    transport: registry
    signature: insecure
status:
  booted:
    image:
      image:
        image: ghcr.io/ondrejbudai/fedora-bootc:39 <-- LOOK HERE
        transport: registry
        signature: insecure
      version: 39.20231220.0
      timestamp: null
      imageDigest: sha256:bbb35d247de551d80e9828967114e0bf60de787f6650ee8019b499f0a5772fbe
    incompatible: false
    pinned: false
    ostree:
      checksum: 3ca9bf074ad6d8580742e7ee022f4ed8977a234bc74f81d33ee4358c2931aa6c
      deploySerial: 0

I suppose this gets fixed with #18, but I wonder if we can have a short-term fix.

@cgwalters
Copy link
Contributor

I suppose this gets fixed with #18,

Yeah...this is yet another thing...

@cgwalters cgwalters added the area/should-be-bootc Bugs that will be fixed when we switch to using bootc label Jan 16, 2024
@cgwalters
Copy link
Contributor

cgwalters commented Jan 16, 2024

It's actually worse than this...the osbuild ostree-container abstraction is pretty broken in this topic in general because it always sets:

TargetImgref: fmt.Sprintf("ostree-remote-registry:%s:%s", p.Remote.Name, p.containerSpec.Source),

Even if p.Remote.Name is unset...we end up with the empty string.

Yet this is definitely not right, because we must support cases without an ostree remote set, just a container image reference. See also containers/bootc#230 in this space.

@cgwalters cgwalters self-assigned this Jan 16, 2024
cgwalters added a commit to cgwalters/osbuild-images that referenced this issue Jan 16, 2024
This will address osbuild/bootc-image-builder#69

(But not marking closes because we need to update the vendor there)
@cgwalters
Copy link
Contributor

PR in osbuild/images#378

github-merge-queue bot pushed a commit to osbuild/images that referenced this issue Jan 17, 2024
This will address osbuild/bootc-image-builder#69

(But not marking closes because we need to update the vendor there)
@cgwalters
Copy link
Contributor

Fixed by #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/should-be-bootc Bugs that will be fixed when we switch to using bootc
Projects
None yet
2 participants