oc-mirror failed with check the minVersion, maxVersion, and default channel for each invalid package.

Solution Unverified - Updated

Environment

  • Red Hat Container Platform 4.x
  • Red Hat Quay 3.x

Issue

  • oc-mirror failed mirroring of quay-operator in OCP
error: error converting declarative config to include config: invalid index:
├── invalid package "container-security-operator":
│   └── invalid channel "stable-3.8":
│       └── channel must contain at least one bundle
└── invalid package "quay-operator":
    └── invalid channel "stable-3.8":
        └── channel must contain at least one bundle

Resolution

  • ImageSetConfiguration declaration was not right. The following ImageSetConfiguration worked fine.
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  registry:
    imageURL: az01mirror.dachlab.net:8443/ocp-mirror/quaytest
    skipTLS: false
mirror:
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.11
      packages:
        - name: quay-operator
            minVersion: 3.7.11
            maxVersion: 3.8.0

Root Cause

  • ImageSetConfiguration declaration was wrong.

The following snippet of ImageSetConfiguration without min and max version of package did not work.

packages:
        - name: quay-operator
          channels:
            - name: stable-3.7
SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.