This is a clone of issue OCPBUGS-52588. The following is the description of the original issue:
—
Description of problem:
When an invalid packages are included in the ImageSetConfiguration and the operator catalog becomes without any valid package, d2m fails. The operator catalog image should be skipped in case no operators were found for that operator catalog.
With the following ImageSetConfiguration:
kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v2alpha1 mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.17 packages: - name: netscaler-operator
- m2d
./bin/oc-mirror -c ./alex-tests/alex-isc/pr-1093.yaml file://alex-tests/pr-1093 --v2
2. I removed the working-dir under the folder pr-1093 and the oc-mirror cache to simulate a d2m from scratch on a disconnected environment where I only have the tarball
rm -rf ~/.oc-mirror/ && rm -rf ./alex-tests/pr-1093/working-dir
3. d2m
./bin/oc-mirror -c ./alex-tests/alex-isc/pr-1093.yaml --from file://alex-tests/pr-1093 docker://localhost:6000 --dest-tls-verify=false --v2
Actual results:
./bin/oc-mirror -c ./alex-tests/alex-isc/pr-1093.yaml --from file://alex-tests/pr-1093 docker://localhost:6000 --dest-tls-verify=false --v2 2025/03/07 12:29:46 [INFO] : :wave: Hello, welcome to oc-mirror 2025/03/07 12:29:46 [INFO] : :gear: setting up the environment for you... 2025/03/07 12:29:46 [INFO] : :twisted_rightwards_arrows: workflow mode: diskToMirror 2025/03/07 12:30:11 [INFO] : 🕵 going to discover the necessary images... 2025/03/07 12:30:11 [INFO] : :mag: collecting release images... 2025/03/07 12:30:11 [INFO] : :mag: collecting operator images... 2025/03/07 12:30:11 [ERROR] : [OperatorImageCollector] stat .: no such file or directory ✗ () Collecting catalog registry.redhat.io/redhat/redhat-operator-index:v4.17 2025/03/07 12:30:11 [INFO] : :wave: Goodbye, thank you for using oc-mirror 2025/03/07 12:30:11 [ERROR] : stat .: no such file or directory
Expected results:
m2d should should fail when there is no related images found for the specified catalog (invalid operator netscaler-operator for the ImageSetConfiguration used above)
Additional info:
- clones
-
OCPBUGS-52588 [v2] d2m fails when invalid package is found in the ImageSetConfiguration
-
- Verified
-
- is blocked by
-
OCPBUGS-52588 [v2] d2m fails when invalid package is found in the ImageSetConfiguration
-
- Verified
-
- links to