-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
-
None
*Title:* oc-mirror fails with "invalid default channel configuration" when package default channel is excluded by catalog filter
*Component:* oc-mirror / mirror.openshift.io
*Version:* 4.18.0 (observed with 4.18.0-202510210939.p2.g0c70491)
*Severity:* Major
*Priority:* High (blocks disconnected telco hub and similar curated mirror workflows)
—
-
- Summary
When using `oc-mirror` (v2) with an ImageSetConfiguration that restricts operator packages to specific channels (e.g. only `release-2.13` for `advanced-cluster-management`), mirroring fails with:
```text
collection error: collect catalog "registry.redhat.io/redhat/redhat-operator-index:v4.18":
invalid default channel configuration for package "advanced-cluster-management":
the default channel "release-2.15" was filtered out, a new default channel must be configured for this package
```
The catalog’s default channel for that package is `release-2.15`, which is not in the user’s channel list. oc-mirror does not allow the user to specify an effective default channel when the catalog default is filtered out, and does not infer one from the configured channels (e.g. use the only or first listed channel).
—
-
- Market Problem
Operators and platform teams need to mirror only a *curated set* of operators and channels into disconnected or air-gapped environments (e.g. telco hub, edge, locked-down registries). ImageSetConfiguration supports this by listing `packages` and per-package `channels`. For packages where the *upstream catalog’s default channel* is not the one the customer wants (e.g. they want an older supported channel like `release-2.13` for ACM instead of `release-2.15`), the user explicitly configures only the desired channel. Today, that valid configuration causes oc-mirror to fail instead of honoring the user’s channel choice as the effective default for the mirrored catalog.
—
-
- Why it Matters
- *Disconnected / telco deployments:* Reference flows (e.g. telco-reference, RDS) ship ImageSetConfiguration files that pin operators to specific versions/channels for compatibility (e.g. ACM 2.13, GitOps 1.15). Those configs are invalid with current oc-mirror if the catalog default for any included package is not in the channel list.
- *No workaround in config:* There is no supported way in ImageSetConfiguration to say “use this channel as the default for this package when the catalog default is filtered out.” Users must either mirror the entire catalog (wasteful, often not allowed) or change to a channel they do not want.
- *Regression risk:* As Red Hat updates default channels in operator catalogs (e.g. ACM moving to release-2.15), existing curated configs that only list older channels start failing with no change on the user side.
—
-
- Illustrative User Stories or Scenarios
1. *Telco hub operator:* I maintain an imageset-config that mirrors only ACM, MCE, TALM, GitOps, ODF, LSO, etc., with specific channels (e.g. ACM release-2.13, GitOps 1.15) for our certified stack. When the upstream catalog sets ACM’s default to release-2.15, `oc-mirror` fails even though I only want release-2.13. I cannot complete the mirror without changing my channel or hacking the tool.
2. *Edge / disconnected registry:* I use a minimal ImageSetConfiguration to save space and compliance scope. I list only the channels we support. If the catalog default for any package is not in my list, mirroring fails. I need the tool to treat my chosen channel(s) as the source of truth for the mirrored catalog.
3. *CI/CD for mirror content:* Our pipeline runs `oc-mirror` with a checked-in imageset-config. When a new catalog version changes a package’s default channel, the same config that worked last week starts failing. We need a stable way to pin “default channel” per package in config so builds are reproducible.
—
-
- Expected Outcomes (user value)
- *Explicit default in config:* Users can optionally specify a `defaultChannel` (or equivalent) per package in ImageSetConfiguration. When the catalog’s default is filtered out, oc-mirror uses this value for the mirrored catalog.
- *Sensible fallback:* If the user does not set `defaultChannel` but lists one or more channels for a package, oc-mirror uses the first listed channel (or the only one) as the effective default when the catalog default is not in the list, instead of failing.
- *Stable behavior:* A given ImageSetConfiguration continues to work across catalog updates that only change default channels, as long as the user’s chosen channels still exist.
—
-
- Effect
- *Current:* Mirroring fails with a clear but unresolved error. Users must either add the catalog’s default channel (even if they do not want it), stop including that package, or wait for a product fix.
- *After fix:* Curated mirror configs (telco hub, edge, minimal mirrors) work when only non-default channels are requested. Operators can pin to supported older channels (e.g. ACM 2.13) without oc-mirror errors. Fewer support escalations and one-off workarounds.
—
-
- Technical Details (for implementors)
- *Repro:* Use an ImageSetConfiguration that includes package `advanced-cluster-management` with only channel `release-2.13` (or any channel that is not the catalog default). Run `oc-mirror` mirrorToMirror with that config and a redhat-operator-index for a version where ACM’s default channel is e.g. `release-2.15`.
- *Reference config:* [telco-hub imageset-config.yaml](https://github.com/openshift-kni/telco-reference/blob/9fdfc7ed81104c87eed5d4689f7dd11b1b1d7a0f/telco-hub/install/mirror-registry/imageset-config.yaml) (lines 14–18: ACM with only `release-2.13`).
- *Suggested schema extension (example):* Allow per-package `defaultChannel` in mirror.openshift.io/v2alpha1 when it’s not the catalog default; and/or define that when all listed channels are explicitly chosen and the catalog default is filtered out, use the first (or only) listed channel as the default for the mirrored catalog.