Description of problem:
oc-mirror shouldn't clean out the operator versions that are not referenced in the channel anymore Cu has following ImageSetConfiguration. They are running oc-mirror GitVersion: 4.11.0-2022082035.p0.g3c1c80c.assembly.stream-3c1c80c. apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10 targetName: bit-redhat-operator-catalog-platform-essentials-index packages: - name: elasticsearch-operator channels: - name: stable minVersion: 5.4.2 - name: cluster-logging channels: - name: stable minVersion: 5.4.2 This works at first and it makes 5.4.2 available in their internal catalog. However after some time the version 5.4.2 disappears out of their catalog and we get the following error while syncing: ERRO[0108] Operator elasticsearch-operator was not found, please check name, minVersion, maxVersion, and channels in the config file. ERRO[0108] Operator cluster-logging was not found, please check name, minVersion, maxVersion, and channels in the config file. The issue is that the original configured version 5.4.2 is not anymore in the catalog, which we can verify by querying the catalog: $ oc-mirror list operators --catalog registry.redhat.io/redhat/redhat-operator-index:v4.10 --package elasticsearch-operator --channel stable WARN[0022] DEPRECATION NOTICE: Sqlite-based catalogs and their related subcommands are deprecated. Support for them will be removed in a future release. Please migrate your catalog workflows to the new file-based catalog format. VERSIONS 5.5.0 $ oc-mirror list operators --catalog registry.redhat.io/redhat/redhat-operator-index:v4.10 --package elasticsearch-operator --channel stable-5.4 WARN[0019] DEPRECATION NOTICE: Sqlite-based catalogs and their related subcommands are deprecated. Support for them will be removed in a future release. Please migrate your catalog workflows to the new file-based catalog format. VERSIONS 5.4.4 So, a) the version 5.4.2 completely disappeard b) the stable channel now starts with 5.5.0 The oc-mirror would clean out the versions that are not referenced anymore and thus we would assume that 5.4.2 would be cleaned from the mirror. Which they definitely do not want to happen, since they still have that version on clusters in their environment. It is quite tedious to keep editing the image-set.yaml for all the versions that disappear out of the catalog
Version-Release number of selected component (if applicable):
oc-mirror GitVersion: 4.11.0-2022082035.p0.g3c1c80c.assembly.stream-3c1c80c
How reproducible:
100%
Steps to Reproduce:
1. Create an ImageSetConfiguration to mirror a particular operator 2. Mirror the operator to mirror registry using oc-mirror 3. The specified version of the operator disappears from the catalog after a few days when there are changes in the channel and start getting the mentioned error on sync.
Actual results:
Operator disappears from the catalog
Expected results:
The mentioned version of the operator to be available in mirror registry even after it's not referenced in the channel
Additional info:
- depends on
-
OCPBUGS-9924 Remove unsupported warning in oc-mirror when using the --skip-pruning flag
- Closed
- is documented by
-
OCPBUGS-10984 Docs for oc-mirror --skip-pruning flag
- Closed
- is related to
-
CFE-739 As a OpenShift admin I want to disable pruning for mirroring jobs
- Closed
- relates to
-
RFE-3186 Configurable pruning behavior of oc mirror
- Accepted
- links to