Description of problem:
When there is one additional Image to mirror but theb it failed and no image was mirrored, so the step to prepare the tar ball should be skipped.
Version-Release number of selected component (if applicable):
[cloud-user@preserve-oc-mirror-vm knarra]$ ./oc-mirror version W0205 06:11:10.048141 3628 mirror.go:102] ⚠️ oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2 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:"v0.2.0-alpha.1-351-ga86dc98", GitCommit:"a86dc982", GitTreeState:"clean", BuildDate:"2025-02-04T16:45:48Z", GoVersion:"go1.23.4", Compiler:"gc", Platform:"linux/amd64"}
How reproducible:
Always
Steps to Reproduce:
1. Use the ImageSetConfig as shown below 2. Run command mirror2disk `oc-mirror -c /tmp/isc.yaml file://test --v2` 3.
Actual results:
2025/02/05 06:13:44 [INFO] : 👋 Hello, welcome to oc-mirror 2025/02/05 06:13:44 [INFO] : ⚙️ setting up the environment for you... 2025/02/05 06:13:44 [INFO] : 🔀 workflow mode: mirrorToDisk 2025/02/05 06:13:44 [INFO] : 🕵 going to discover the necessary images... 2025/02/05 06:13:44 [INFO] : 🔍 collecting release images... 2025/02/05 06:13:44 [INFO] : 🔍 collecting operator images... ✗ (2s) Collecting catalog registry.redhat.io/redhat/redhat-operator-index:v4.20 2025/02/05 06:13:46 [WARN] : [OperatorImageCollector] catalog reading manifest v4.20 in registry.redhat.io/redhat/redhat-operator-index: manifest unknown : SKIPPING 2025/02/05 06:13:46 [INFO] : 🔍 collecting additional images... 2025/02/05 06:13:46 [INFO] : 🔍 collecting helm images... 2025/02/05 06:13:46 [INFO] : 🔂 rebuilding catalogs 2025/02/05 06:13:46 [INFO] : 🚀 Start copying the images... 1 / 1 (0s) [===========================================================================================================================================================================================================================] 100 % ✗ (0s) ubi:latest ➡️ cache 2025/02/05 06:13:47 [INFO] : === Results === 2025/02/05 06:13:47 [INFO] : ✗ 0 / 1 additional images mirrored: Some additional images failed to be mirrored - please check the logs 2025/02/05 06:13:47 [ERROR] : [Worker] error mirroring image registry.redhat.io/ubi10/ubi:latest error: initializing source docker://registry.redhat.io/ubi10/ubi:latest: reading manifest latest in registry.redhat.io/ubi10/ubi: unauthorized: access to the requested resource is not authorized 2025/02/05 06:13:47 [INFO] : 📦 Preparing the tarball archive... 2025/02/05 06:13:47 [INFO] : 👋 Goodbye, thank you for using oc-mirror 2025/02/05 06:13:47 [ERROR] : unable to add cache repositories to the archive : lstat /home/cloud-user/.oc-mirror/.cache/docker/registry/v2/repositories: no such file or directory
Expected results:
step to prepare tarball should be skipped
Additional info:
[cloud-user@preserve-oc-mirror-vm knarra]$ cat /tmp/isc_cachedir.yaml kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v2alpha1 mirror: platform: channels: - name: stable-4.18 minVersion: 4.18.1 maxVersion: 4.18.1 operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.20 packages: - name: external-dns-operator additionalImages: - name: registry.redhat.io/ubi10/ubi:latest
Thread where the discussion has happened https://redhat-internal.slack.com/archives/C050P27C71S/p1738754109519959?thread_ts=1738669287.426849&cid=C050P27C71S
- is incorporated by
-
OCPBUGS-49880 v2: oc-mirror reports success exit (0) even in case of errors
-
- Closed
-