Description of problem:
when set the targetCatalog and targetTag the oc-mirror command will failed with error : Rendering catalog image "default-route-openshift-image-registry.apps.yinzhou-20.qe.azure.devcluster.openshift.com/testzy/mno-index:v5" with file-based catalog error: error rebuilding catalog images from file-based catalogs: error building catalog layers: HEAD https://default-route-openshift-image-registry.apps.yinzhou-20.qe.azure.devcluster.openshift.com/v2/testzy/mno-index/manifests/sha256:95b938d3861905a26c587cc55a1eecfb6c556cd999ab44df64648d9685b60a62: unexpected status code 500 Internal Server Error (HEAD responses have no body, use GET for details)
Version-Release number of selected component (if applicable):
oc-mirror version
WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.14.0-202306081549.p0.g063e0bb.assembly.stream-063e0bb", GitCommit:"063e0bbb222b37ac8183ef9dfbdb32f6541092a0", GitTreeState:"clean", BuildDate:"2023-06-08T16:16:33Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}
How reproducible:
always
Steps to Reproduce:
1. With oci fbc catalogs imagesetconfigure:
cat config.yaml
apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
storageConfig:
registry:
imageURL: default-route-openshift-image-registry.apps.yinzhou-15.qe.azure.devcluster.openshift.com/albo/metadata2:latest
skipTLS: true
mirror:
operators:
- catalog: oci:///home/ocmirrortest/noo/redhat-operator-index
targetCatalog: mno-index
targetTag: v5
packages:
- name: aws-load-balancer-operator
2. Run oc-mirror with oci format:
`oc-mirror --config config.yaml docker://default-route-openshift-image-registry.apps.yinzhou-15.qe.azure.devcluster.openshift.com/albo --dest-skip-tls --include-local-oci-catalogs --max-nested-paths 2`
3. With normal catalogs imagesetconfigure:
cat config-nn.yaml
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
registry:
imageURL: default-route-openshift-image-registry.apps.yinzhou-20.qe.azure.devcluster.openshift.com/testzy/metadata2:latest
skipTLS: true
mirror:
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12
targetCatalog: mno-index
targetTag: v5
packages:
- name: aws-load-balancer-operator
4. Run the oc-mirror with non-oci format :
`oc-mirror --config config-nn.yaml docker://default-route-openshift-image-registry.apps.yinzhou-20.qe.azure.devcluster.openshift.com/testzy --dest-skip-tls --dest-use-http --max-nested-paths 2`
Actual results:
2. command failed with error: info: Mirroring completed in 1.73s (0B/s) Rendering catalog image "default-route-openshift-image-registry.apps.yinzhou-15.qe.azure.devcluster.openshift.com/albo/mno-index:v5" with file-based catalog error: error rebuilding catalog images from file-based catalogs: error building catalog layers: HEAD https://default-route-openshift-image-registry.apps.yinzhou-15.qe.azure.devcluster.openshift.com/v2/albo/mno-index/manifests/sha256:23797b370d515e188a20808d1c9c104b0298728dc5c61c98ea7c9c7daa70c828: unexpected status code 500 Internal Server Error (HEAD responses have no body, use GET for details) 4. command failed with error: Rendering catalog image "default-route-openshift-image-registry.apps.yinzhou-20.qe.azure.devcluster.openshift.com/testzy/mno-index:v5" with file-based catalog error: error rebuilding catalog images from file-based catalogs: error building catalog layers: HEAD https://default-route-openshift-image-registry.apps.yinzhou-20.qe.azure.devcluster.openshift.com/v2/testzy/mno-index/manifests/sha256:95b938d3861905a26c587cc55a1eecfb6c556cd999ab44df64648d9685b60a62: unexpected status code 500 Internal Server Error (HEAD responses have no body, use GET for details)
Expected results:
2/4 : no error when check the exist manifests for setting targetCatalog and targetTag
Additional info: