Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirroring fails when minVersion or maxVersion removed from config. #805

Open
kristvanbesien opened this issue Mar 1, 2024 · 1 comment

Comments

@kristvanbesien
Copy link

kristvanbesien commented Mar 1, 2024

Version

$ oc-mirror version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.15.0-202402082307.p0.gcae37aa.assembly.stream.el8-cae37aa", GitCommit:"cae37aa25d9d96bdedcee45e659188a644f78a58", GitTreeState:"clean", BuildDate:"2024-02-09T00:49:20Z", GoVersion:"go1.20.12 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

What happened?

I created a mirror using this config:

kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  registry:
    imageURL: registry.s.kri.st/mirror/oc-mirror-metadata
    skipTLS: false
mirror:
  platform:
    channels:
    - name: stable-4.14
      type: ocp
    - name: fast-4.14
      type: ocp
    - name: candidate-4.14
      type: ocp
  operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14
    packages:
    - name: odf-operator
    - name: advanced-cluster-management
      channels:
      - name: release-2.9
      - name: release-2.8
        minVersion: 'a2.8.4'
        maxVersion: '2.8.4'
    - name: kubevirt-hyperconverged
    - name: lvms-operator
    - name: kubernetes-nmstate-operator
    - name: sriov-network-operator

That mirror ran successfully.

I then edited the config and removed the minVersion and maxVersion

kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  registry:
    imageURL: registry.s.kri.st/mirror/oc-mirror-metadata
    skipTLS: false
mirror:
  platform:
    channels:
    - name: stable-4.14
      type: ocp
    - name: fast-4.14
      type: ocp
    - name: candidate-4.14
      type: ocp
  operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.14
    packages:
    - name: odf-operator
    - name: advanced-cluster-management
      channels:
      - name: release-2.9
      - name: release-2.8
    - name: kubevirt-hyperconverged
    - name: lvms-operator
    - name: kubernetes-nmstate-operator
    - name: sriov-network-operator

Then I ran mirror again, and got an errror:

Checking push permissions for registry.s.kri.st
Found: oc-mirror-workspace/src/publish
Found: oc-mirror-workspace/src/v2
Found: oc-mirror-workspace/src/charts
Found: oc-mirror-workspace/src/release-signatures

The rendered catalog is invalid.

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

error: error updating include config: Invalid character(s) found in major number "advanced-cluster-management"

What did you expect to happen?

I expected the mirror run successfulluy.

Note that this is something I also seen on a different system. So I set out to try to reproduce it in my own home system, and I have the problem there as well.

@kristvanbesien
Copy link
Author

What also fails is:

  • Just removing the maxversion
  • Putting the maxversion back in....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant