Description of problem:
Issue : oc-mirror from disk to registry is failing with below error:
error mirroring image docker://registry.redhat.io/openshift4/ose-oauth-proxy-rhel9@sha256:d2dbbeb5d9537171aaab7c0dcc127990ec277d27da480fee65087ebfcb24596d (Operator bundles: [ocs-operator.v4.16.7-rhodf ocs-operator.v4.16.8-rhodf advanced-cluster-management.v2.11.5 advanced-cluster-management.v2.11.6 ocs-operator.v4.16.5-rhodf ocs-operator.v4.16.6-rhodf] - Operators: [ocs-operator advanced-cluster-management]) error: copying image 1/4 from manifest list: trying to reuse blob sha256:ae0badd537673e93bcbcf384ce6acda3cdfef75d43bd2f7bc766ef5ffba3e51a at destination: can't talk to a V1 container registry
- In each attempt the failure is for different images
✓ (4s) ocs-operator-bundle@sha256:1bbc151acb46edd4c042acd66d028eaa6b514204ad79c8be708d89f07c9f9e81 ➡️ xxxx/odf4/ 2025/06/04 21:53:18 [INFO] : === Results === 2025/06/04 21:53:18 [INFO] : ✗ 871 / 947 operator images mirrored: Some operator images failed to be mirrored - please check the logs
- while looking at the registry log(quay), we can see the upload is completed and present in the registry
Jun 04 21:14:19 xxxx podman[17944]: gunicorn-registry stdout | 2025-06-04 14:14:19,134 [228] [INFO] [gunicorn.access] 10.16.60.1 - - [04/Jun/2025:14:14:19 +0000] "PUT /v2/openshift4/ose-oauth-proxy-rhel9/manifests/sha256-d2dbbeb5d9537171aaab7c0dcc127990ec277d27da480fee65087ebfcb24596d HTTP/1.1" 201 2 "-" "oc-mirror"
- Verified the image is already present in the registry by pulling manually but still oc-mirror reporting its failed with above error:
podman pull xxxx/openshift4/ose-oauth-proxy-rhel9:sha256-d2dbbeb5d9537171aaab7c0dcc127990ec277d27da480fee65087ebfcb24596d Trying to pull xxxx/openshift4/ose-oauth-proxy-rhel9:sha256-d2dbbeb5d9537171aaab7c0dcc127990ec277d27da480fee65087ebfcb24596d... Getting image source signatures Copying blob 7d009cf0ff7a done | Copying blob ae0badd53767 done | Copying blob 01f42bf2cce5 done | Copying config 32d7bd1b21 done | Writing manifest to image destination 32d7bd1b218ef54daeb0cbed9293ee15f51545d465e47121da531591222c4964
- Tried mirroring multiple times every time one another images are reporting the same even the image available in the registry.
- It seems oc-mirror is doing the validation very quickly before registry is responding, so we tried the mirroring using --image-timeout 20m --retry-times 5 --retry-delay 2s --parallel-images 1 --parallel-layers 1
./oc-mirror --config imageset.yaml --from file://mirror-images/ docker://xxxx --v2 --image-timeout 20m --retry-times 5 --retry-delay 2s --parallel-images 1 --parallel-layers 1 - Above parameter helped for little im provement but not resolved.
✓ (0s) redhat-operator-index:v4.16 ➡️ xxx/redhat/ 2025/06/04 22:59:02 [INFO] : === Results === 2025/06/04 22:59:02 [INFO] : ✗ 905 / 947 operator images mirrored: Some operator images failed to be mirrored - please check the logs
- Took the list of failing images reported by oc-mirror from mirroring_errors.log and manually verified those images are present in the registry by doing a podman pull in the loop manually.
Version-Release number of selected component (if applicable):
4.18
How reproducible:
Reproducible in customer environment always
Actual results:
oc-mirror reporting failure for already available images in the registry
Expected results:
oc-mirror should not report failure for already available images in the registry
Additional info: