Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2099899

Summary: oc-mirror looks for layers in the wrong repository when searching for release images during publishing
Product: OpenShift Container Platform Reporter: Jennifer Power <jpower>
Component: ocAssignee: Alex <aflom>
oc sub component: oc-mirror QA Contact: zhou ying <yinzhou>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: jpower, vdinh
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:18:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jennifer Power 2022-06-21 22:28:34 UTC
Description of problem:

oc-mirror looks for layers in the wrong repository when searching for release images during publishing. Release images are mapped to a new repo between the source and destination registry and the source registry repo and namespace are being searched.


Version-Release number of selected component (if applicable):
$ oc-mirror version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.2.0-alpha.1-41-gf93ddac", GitCommit:"f93ddac", GitTreeState:"clean", BuildDate:"2022-05-20T15:57:49Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}

How reproducible:


Steps to Reproduce:
1. Generate first config
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  local:
    path: ./
mirror:
  platform:
    channels:
    - name: stable-4.10
      type: ocp
      minVersion: 4.10.15
      maxVersion: 4.10.15
2. oc-mirror --config ~/configs/imageset.yaml file://archive
3. Generate second config
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  local:
    path: ./
mirror:
  platform:
    channels:
    - name: stable-4.10
      type: ocp
      minVersion: 4.10.15
      maxVersion: 4.10.16
4. oc-mirror --config ~/configs/imageset.yaml file://archive
5. Publish in order
oc-mirror --from archive/mirror_seq1_000000.tar docker://localhost:5001/test
oc-mirror --from archive/mirror_seq2_000000.tar docker://localhost:5001/test

Actual results:
Publishing image set from archive "archive/mirror_seq2_000000.tar" to registry "localhost:5001"
error: error occurred during image processing: [layer sha256:a7635174fc67fd997681528eb831bf1c492bbb6b30ffd430aca98a9a89975bab: copy blob for localhost:5001/test/openshift-release-dev/ocp-v4.0-art-dev@sha256:0d94f19d4012b22604dea71832897acda8e597703b73b50626a0478f89da047a: error copying blob "sha256:a7635174fc67fd997681528eb831bf1c492bbb6b30ffd430aca98a9a89975bab": unknown blob, layer sha256:804449b22e26cc93ec79fad318d5af873434fe344ccaf377c2487df2ad851776: copy blob for localhost:5001/test/openshift-release-dev/ocp-v4.0-art-dev@sha256:df9d0722e24161ecc5ceb80f93661ea64187bd6bd8012c9ef7267b28724ed35a: error copying blob "sha256:804449b22e26cc93ec79fad318d5af873434fe344ccaf377c2487df2ad851776": unknown blob, layer sha256:237bfbffb5f297018ef21e92b8fede75d3ca63e2154236331ef2b2a9dd818a02: copy blob for localhost:5001/test/openshift-release-dev/ocp-v4.0-art-dev@sha256:4092bf2edc1fde3b4caefee62cb5fa3f5021be767ba882704c7deee8b98e080e: error copying blob "sha256:237bfbffb5f297018ef21e92b8fede75d3ca63e2154236331ef2b2a9dd818a02": unknown blob, layer sha256:39382676eb30fabb7a0616b064e142f6ef58d45216a9124e9358d14b12dedd65: copy blob for localhost:5001/test/openshift-release-dev/ocp-v4.0-art-dev@sha256:1b0bfadc90d91a74d9efb28d1175f8287e1443aa0e5cd3e50a1c67db50142c53: error copying blob "sha256:39382676eb30fabb7a0616b064e142f6ef58d45216a9124e9358d14b12dedd65": unknown blob]


Expected results:

Successful publish

Additional info:

https://github.com/openshift/oc-mirror/issues/491

Comment 3 zhou ying 2022-06-23 14:10:23 UTC
with the same configsetting, can't reproduce the issue now :

oc-mirror --from  mirror_seq1_000000.tar docker://localhost:5000/test --dest-use-http

oc-mirror --from  mirror_seq2_000000.tar  docker://localhost:5000/test --dest-use-http

Comment 5 errata-xmlrpc 2022-08-10 11:18:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069