Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-34974

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

XMLWordPrintable

    • None
    • None
    • None
    • None

      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:

          {
            "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
            "digest": "sha256:56a502bb0e015cc421441293acf63d9b6cf23615a57131cd302e3ccb991a894a",
            "size": -1
          } 

      This causes bootc failures:

      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

      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:

      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

       

              iballou@redhat.com Ian Ballou
              iballou@redhat.com Ian Ballou
              Gerrod Ubben, Ian Ballou, Tihomir Hadzhiev
              Sam Bible Sam Bible
              Quinn James Quinn James
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: