This is a clone of issue OCPBUGS-49730. The following is the description of the original issue:
—
Description of problem:
When there are no images for copying or size of images to copy is zero oc-mirror enters into infinite loop as shown below
{code:java}
[fedora@knarra-fedora knarra]$ ./oc-mirror -c /tmp/iscoci.yaml file://test --v2 --cache-dir /test/yinzhou
2025/01/31 17:25:34 [INFO] : :wave: Hello, welcome to oc-mirror
2025/01/31 17:25:34 [INFO] : :gear: setting up the environment for you...
2025/01/31 17:25:34 [INFO] : :twisted_rightwards_arrows: workflow mode: mirrorToDisk
2025/01/31 17:25:34 [INFO] : 🕵 going to discover the necessary images...
2025/01/31 17:25:34 [INFO] : :mag: collecting release images...
2025/01/31 17:25:34 [INFO] : :mag: collecting operator images...
✗ () Collecting catalog oci:///home/fedora/knarra/openshift-tests-private/redhat-operator-index
2025/01/31 17:25:34 [WARN] : [OperatorImageCollector] catalog invalid source name oci:///home/fedora/knarra/openshift-tests-private/redhat-operator-index: lstat /home/fedora/knarra/openshift-tests-private: no such file or directory : SKIPPING
2025/01/31 17:25:34 [INFO] : :mag: collecting additional images...
2025/01/31 17:25:34 [INFO] : :mag: collecting helm images...
2025/01/31 17:25:34 [INFO] : :repeat_one: rebuilding catalogs
2025/01/31 17:25:34 [INFO] : :rocket: Start copying the images...
207712134 / 0 (7m56s) [------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0 %
Version-Release number of selected component (if applicable):{code:none}
4.18
How reproducible:
Always
Steps to Reproduce:
1. Run the command to copy redhat-operator-index as an oci file by using command skopeo copy --all docker://registry.redhat.io/redhat/redhat-operator-index:v4.16 --remove-signatures --insecure-policy oci:///home/fedora/knarra/redhat-operator-index
2. Now create imageSetConfig.yaml as shown below
{code:java}
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v2alpha1
mirror:
operators:
- catalog: oci:///home/fedora/knarra/openshift-tests-private/redhat-operator-index
targetCatalog: "ocicatalog73452"
targetTag: "v16"
packages:
- name: cluster-kube-descheduler-operator
3. Run command oc-mirror -c /tmp/iscoci.yaml file://test --v2 --cache-dir /test/yinzhou
Actual results:{code:none}
You can see that mirroring enters into infinite loop
Expected results:
Mirroring should fail since there is no such directory and come out.
Additional info:
https://redhat-internal.slack.com/archives/C050P27C71S/p1738344713804659
- clones
-
OCPBUGS-49730 oc-mirror enters into infinite loop when size of images to copy is zero
-
- Closed
-
- is blocked by
-
OCPBUGS-49730 oc-mirror enters into infinite loop when size of images to copy is zero
-
- Closed
-
- links to
-
RHEA-2024:6122
OpenShift Container Platform 4.18.z bug fix update