ibm-mas / ansible-devops

Ansible collection supporting devops for IBM Maximo Application Suite
https://ibm-mas.github.io/ansible-devops/
Eclipse Public License 2.0
48 stars 80 forks source link

Mirroring OpenShift Operators fails with: current default channel could not be determined #1288

Closed ChrisSchneiderIBM closed 1 month ago

ChrisSchneiderIBM commented 2 months ago

Hello, running:

podman run -it --rm -v /opt/mas-mirror/:/mnt/mas-mirror/:z quay.io/ibmmas/cli:8.2.2 -- mas mirror-redhat-images --mode to-filesystem --dir /mnt/mas-mirror/ocp-catalog/ --mirror-operators --release 4.14 -H registry.gym.lan -P 8443 -u init -p xxx --pullsecret /mnt/mas-mirror/ocp-pull-secret.json --no-confirm

fails with:

The current default channel was not valid, so an attempt was made to automatically assign a new default channel, which has failed.
The failure occurred because none of the remaining channels contain an "olm.channel" priority property, so it was not possible to establish a channel to use as the default channel.

This can be resolved by one of the following changes:
1) assign an "olm.channel" property on the appropriate channels to establish a channel priority
2) modify the default channel manually in the catalog
3) by changing the ImageSetConfiguration to filter channels or packages in such a way that it will include a package version that exists in the current default channel

The rendered catalog is invalid.

Run "oc-mirror list operators --catalog CATALOG-NAME --package PACKAGE-NAME" for more information.

error: error generating diff: the current default channel "v24.3" for package "gpu-operator-certified" could not be determined... ensure that your ImageSetConfiguration filtering criteria results in a package version that exists in the current default channel

It seems v23.9 was replaced by v24.3 as the default channel:

$ oc-mirror list operators --catalog registry.redhat.io/redhat/certified-operator-index:v4.14 --package gpu-operator-certified
Logging to .oc-mirror.log
NAME                    DISPLAY NAME         DEFAULT CHANNEL
gpu-operator-certified  NVIDIA GPU Operator  v24.3

PACKAGE                 CHANNEL  HEAD
gpu-operator-certified  stable   gpu-operator-certified.v24.3.0
gpu-operator-certified  v1.10    gpu-operator-certified.v1.10.1
gpu-operator-certified  v1.11    gpu-operator-certified.v1.11.1
gpu-operator-certified  v22.9    gpu-operator-certified.v22.9.2
gpu-operator-certified  v23.3    gpu-operator-certified.v23.3.2
gpu-operator-certified  v23.6    gpu-operator-certified.v23.6.1
gpu-operator-certified  v23.9    gpu-operator-certified.v23.9.2
gpu-operator-certified  v24.3    gpu-operator-certified.v24.3.0
ChrisSchneiderIBM commented 1 month ago

Fixed in new version of CLI