Project

General

Profile

Actions

Bug #38488

closed

Second container push set manifest size fields to -1, which breaks bootc

Added by Ian Ballou 5 days ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Container
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Second container push set manifest size fields to -1, which breaks bootc
Cloned from 16987120

Description of problem:

If container content is pushed to a repository twice, either with the same or a different tag, the manifests will become broken with a size field of -1: {code:java} {
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:56a502bb0e015cc421441293acf63d9b6cf23615a57131cd302e3ccb991a894a",
"size": -1
} {code}
This causes bootc failures:

{color:#1d1c1d}ERROR Installing to filesystem: Creating ostree deployment: Pulling: Preparing import: Fetching manifest: serialization error: invalid value: integer `-1`, expected u64 at line 1 column 1671{color}

How reproducible:

100%

Is this issue a regression from an earlier version:

Likely no

Steps to Reproduce:

1. Push a bootc image to Satellite

2. Use skopeo to look at the manifest - note the size fields are fine

3. Run the exact same container push command again (or with a new tag)

4. Check the manifest via skopeo - note the size fields are all -1

Actual behavior:
Size fields in the manifest are -1

Expected behavior:
Size fields on the manifest are a normal number and bootc image creation works

Business Impact / *Additional info:*

Users may hit the issue by running: {code:java}
podman run --rm --privileged --volume .:/output --volume $(pwd)/config.json:/config.json --volume /var/lib/containers/storage:/var/lib/containers/storage --volume /run/containers/0/auth.json:/run/containers/0/auth.json:ro --security-opt label=type:unconfined_t --pull newer registry.redhat.io/rhel9/bootc-image-builder:9.5 --tls-verify=false --type qcow2 --config /config.json satellite.example.com/org/product/bootc-repo:sometag{code}
 

Actions

Also available in: Atom PDF