This is a clone of issue OCPBUGS-5891. The following is the description of the original issue:
—
Description of problem:
When used in heads-only mode, oc-mirror does not record the operator bundles minimum version if a target name is set. The record values ensures that bundles that still exist in the catalog are included as part of the generated catalog and that the associated images are not pruned. This behavior will prune bundles that have when no minimum version is set in the imageset configuration and the bundles still exist in the source catalog.
Version-Release number of selected component (if applicable):
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.13.0-202212011938.p0.g8bf1402.assembly.stream-8bf1402", GitCommit:"8bf14023aa018e12425e29993e6f53f0ab07e6ab", GitTreeState:"clean", BuildDate:"2022-12-01T19:56:31Z", GoVersion:"go1.18.4", Compiler:"gc", Platform:"linux/amd64"}
How reproducible:
100%
Steps to Reproduce:
Using the advanced cluster management package as an example. 1. Find the latest bundle for acm in the release-2.6 channel with oc-mirror list operators --catalog registry.redhat.io/redhat/redhat-operator-index:v4.10-1663021232 --package advanced-cluster-management 2. Create an mirror set configuration to mirror an operator from an older catalog version apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration storageConfig: local: path: test mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10-1663021232 targetName: test targetTag: test packages: - name: advanced-cluster-management channels: - name: release-2.6 2. Run oc-mirror --config config-with-operators.yaml file:// 3. Check the bundle minimum version on the metadata using oc-mirror describe mirror_seq1_000000.tar under the field operators, the advanced-cluster-management should show version found in Step 1. 4. Create another ImageSetConfiguration for a later version of the catalog apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration storageConfig: local: path: test mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.10 targetName: test targetTag: test packages: - name: advanced-cluster-management channels: - name: release-2.6 4. Check the bundle minimum version on the metadata using oc-mirror describe mirror_seq2_000000.tar under the operators field.
Actual results:
The catalog entry in the metadata shows packages as null.
Expected results:
It should have the advanced-cluster-managament package with the original minimum version or an updated minimum version if the original bundle was pruned.
- clones
-
OCPBUGS-5891 oc-mirror heads-only does not work with target name
- Closed
- is blocked by
-
OCPBUGS-5891 oc-mirror heads-only does not work with target name
- Closed
- links to