Bug 2099899 - oc-mirror looks for layers in the wrong repository when searching for release images during publishing
Summary: oc-mirror looks for layers in the wrong repository when searching for release...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.11.0
Assignee: Alex
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-21 22:28 UTC by Jennifer Power
Modified: 2022-08-10 11:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:18:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc-mirror pull 492 0 None open Bug 2099899: fix(publish): modifies layer fetcher to gather repos into a map and u… 2022-06-21 22:33:41 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:19:18 UTC

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


Note You need to log in before you can comment on or make changes to this bug.