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

"could not parse reference:" Error while Mirroring an image set to a mirror registry using oc-mirror #897

Open
grantcurell opened this issue Jul 26, 2024 · 3 comments

Comments

@grantcurell
Copy link

grantcurell commented Jul 26, 2024

Exact same problem as #643 except I'm on 4.16.

I'm sure I'm doing something wrong, but at a very minimum, this is a bug in the sense that it should output the problem and not an empty string:

[grant@rockydesktop mirror-registry]$ ../oc-mirror --config=./imageset-config.yaml docker://$quayHostname:8443
Checking push permissions for grant-staging.openshift.lan:8443
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
error: parsing reference "": could not parse reference:

I'm following these instructions

@grantcurell
Copy link
Author

grantcurell commented Jul 26, 2024

The problem seems to be this command is broken:

oc mirror init <--registry <storage_backend> > imageset-config.yaml 

The imageset-config.yaml it generates is incorrect. It generates a file with the following format. I'm not sure why it has v4.17 which at time of writing doesn't exist.

kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  registry:
    imageURL: grant-staging.openshift.lan:8443
    skipTLS: false
mirror:
  platform:
    channels:
    - name: stable-4.16
      type: ocp
  operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.17
    packages:
    - name: serverless-operator
      channels:
      - name: stable
  additionalImages:
  - name: registry.redhat.io/ubi8/ubi:latest
  helm: {}

I updated based on a friend's instructions to:

kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
mirror:
  platform:
    channels:
      - name: stable-4.16
        minVersion: 4.16.0
        maxVersion: 4.17.0
  operators:
    - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16
      packages:
        - name: kubernetes-nmstate-operator
        - name: kubevirt-hyperconverged
        - name: serverless-operator
          channels:
          - name: stable
        - name: local-storage-operator
        - name: odf-operator
        - name: sriov-network-operator
  additionalImages:
    - name: registry.redhat.io/rhel8/support-tools:latest
    - name: registry.redhat.io/ubi8/ubi:latest
  helm: {}

That obviously has some extra operators but it seems like the main difference is it doesn't have my repo info in it. That worked and mirrored correctly.

@dmc5179
Copy link

dmc5179 commented Aug 2, 2024

I have the same error. When running the command

oc-mirror init --registry ip-10-0-170-23.us-east-2.compute.internal:8443 > imageset-config.yaml

I get this output

kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  registry:
    imageURL: ip-10-0-170-23.us-east-2.compute.internal:8443
    skipTLS: false
mirror:
  platform:
    channels:
    - name: stable-4.16
      type: ocp
  operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.17
    packages:
    - name: serverless-operator
      channels:
      - name: stable
  additionalImages:
  - name: registry.redhat.io/ubi8/ubi:latest
  helm: {}

The output should not reference v4.17. At a minimum the output should reference the same major release as the oc-mirror binary, which in this case is:

Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202407100906.p0.g75da281.assembly.stream.el9-75da281", GitCommit:"75da281989a147ead237e738507bbd8cec3175e5", GitTreeState:"clean", BuildDate:"2024-07-10T09:46:55Z", GoVersion:"go1.21.11 (Red Hat 1.21.11-1.module+el8.10.0+21986+2112108a) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

@dmc5179
Copy link

dmc5179 commented Aug 2, 2024

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

2 participants