Description of problem:
when use wrong image set configure , oc-mirror should exit with code 1 and print error info .
Version-Release number of selected component (if applicable):
4.15/4.14
How reproducible:
always
Steps to Reproduce:
1. with the wrong image set configure like : kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 storageConfig: registry: imageURL: localhost:5000/oc-mirror2 skipTLS: true mirror: platform: channels: - name: nightly-4.15 minVersion: 4.15.0-rc.2 maxVersion: 4.15.0-rc.4 graph: true 2. run the oc-mirror command : `./oc-mirror.back --config config-n.yaml docker://localhost:5000/nnn --dest-use-http`
Actual results:
./oc-mirror.back --config config-n.yaml docker://localhost:5000/nnn --dest-use-http Checking push permissions for localhost:5000 Creating directory: oc-mirror-workspace/src/publish Creating directory: oc-mirror-workspace/src/v2 Creating directory: oc-mirror-workspace/src/charts Creating directory: oc-mirror-workspace/src/release-signatures Adding graph data error: invalid mirror sequence order, want 1, got 2 [root@preserve-fedora36 1130]# vi config-n.yaml [root@preserve-fedora36 1130]# ./oc-mirror.back --config config-n.yaml docker://localhost:5000/nnn --dest-use-http Checking push permissions for localhost:5000 Found: oc-mirror-workspace/src/publish Found: oc-mirror-workspace/src/v2 Found: oc-mirror-workspace/src/charts Found: oc-mirror-workspace/src/release-signatures No metadata detected, creating new workspace Adding graph data localhost:5000/ nnn/ubi8/ubi-micro blobs: registry.access.redhat.com/ubi8/ubi-micro sha256:a97cd2266d548d1270d47503c28cf01dfdb821cd50c18593859745a3d1b50c05 3.911KiB registry.access.redhat.com/ubi8/ubi-micro sha256:9820aa2b4ab918da4b503c9355fb655357f6b0c0b7cd8e4e9932455018255b0a 3.912KiB registry.access.redhat.com/ubi8/ubi-micro sha256:8c30bcfa79a2fbfd6524e65a263947d58aa6f0a0ef06cd88c73421c42b4ed4b1 3.915KiB registry.access.redhat.com/ubi8/ubi-micro sha256:fbc72e02bbc8f4348b25a4cd1ba972f8e40b769667ac6f6a45091d06e4378709 3.915KiB registry.access.redhat.com/ubi8/ubi-micro sha256:045e18d332c1aa66f8afb529159b86faefed3b89a958e3051a21b7cf4f4aee26 10.4MiB registry.access.redhat.com/ubi8/ubi-micro sha256:aeef7050d88b3073721e7a1c611a5df528fa2ad57d0c421cb66e8f6d555a7712 10.41MiB registry.access.redhat.com/ubi8/ubi-micro sha256:c3e97d7f8ce34bfe09d9b9768d6b4055015e8111b48f9f385995762438577e87 11.23MiB registry.access.redhat.com/ubi8/ubi-micro sha256:519e2503e65e14dd33f540a455a5248de06ae5c87fd580cb1440a6e98b389dfa 12.87MiB manifests: sha256:32b6ce134e68244a8d4365b10f9baa75679251854e218761402421e628b784f0 sha256:43fe840f67734f2500e66188bcba3622b06dc1a70ace51acd2760f58030d61fa sha256:72e9a405360c1e9f72f4a6b3560f0f9018bf067c23fd0285797f61b214f36ff2 sha256:93167a9e3a6d13eced8796da3c6080d79c06307c3fbb5e323da5b68dc054bb8a sha256:f0119fc2e5693b48c22a215fc31dcb83d436bd8c5cc3018dbd67859ca8ff1b87 sha256:32b6ce134e68244a8d4365b10f9baa75679251854e218761402421e628b784f0 -> latest stats: shared=0 unique=8 size=44.92MiB ratio=1.00phase 0: localhost:5000 nnn/ubi8/ubi-micro blobs=8 mounts=0 manifests=6 shared=0info: Planning completed in 470ms uploading: localhost:5000/nnn/ubi8/ubi-micro sha256:aeef7050d88b3073721e7a1c611a5df528fa2ad57d0c421cb66e8f6d555a7712 10.41MiB uploading: localhost:5000/nnn/ubi8/ubi-micro sha256:519e2503e65e14dd33f540a455a5248de06ae5c87fd580cb1440a6e98b389dfa 12.87MiB uploading: localhost:5000/nnn/ubi8/ubi-micro sha256:045e18d332c1aa66f8afb529159b86faefed3b89a958e3051a21b7cf4f4aee26 10.4MiB uploading: localhost:5000/nnn/ubi8/ubi-micro sha256:c3e97d7f8ce34bfe09d9b9768d6b4055015e8111b48f9f385995762438577e87 11.23MiB sha256:43fe840f67734f2500e66188bcba3622b06dc1a70ace51acd2760f58030d61fa localhost:5000/nnn/ubi8/ubi-micro sha256:72e9a405360c1e9f72f4a6b3560f0f9018bf067c23fd0285797f61b214f36ff2 localhost:5000/nnn/ubi8/ubi-micro sha256:f0119fc2e5693b48c22a215fc31dcb83d436bd8c5cc3018dbd67859ca8ff1b87 localhost:5000/nnn/ubi8/ubi-micro sha256:93167a9e3a6d13eced8796da3c6080d79c06307c3fbb5e323da5b68dc054bb8a localhost:5000/nnn/ubi8/ubi-micro sha256:32b6ce134e68244a8d4365b10f9baa75679251854e218761402421e628b784f0 localhost:5000/nnn/ubi8/ubi-micro:latest info: Mirroring completed in 930ms (50.19MB/s) Writing image mapping to oc-mirror-workspace/results-1705993764/mapping.txt Writing ICSP manifests to oc-mirror-workspace/results-1705993764
Expected results:
oc-mirror can't support the nightly-build ocp images , so should exit with code none 0 and error infomation.
Additional info: