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

oc-mirror command fails with status code 401 Unauthorized when rendering catalog OCP 4.12 redhat-operator-index #870

Open
1Darshan opened this issue Jun 6, 2024 · 2 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@1Darshan
Copy link

1Darshan commented Jun 6, 2024

Version

$ oc-mirror version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.13.0-202405141537.p0.g02367d7.assembly.stream.el8-02367d7", GitCommit:"02367d7a9d25ca823fd52710a5a8484f09454884", GitTreeState:"clean", BuildDate:"2024-05-15T05:51:03Z", GoVersion:"go1.19.13 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

What happened?

I'm trying to create a Airgap OCP cluster, in order to do that I need to mirror the images from the below image set configuration to the following registry us-svl-registry.fyre.ibm.com/olm-mirror(Quay server). So I had already created the image set configuration and stored the credentials in /run/user/0/containers/auth.json & ~/.docker/config.json as a root user in bastion server. And while running the oc-mirror command I'm facing below issue,

The rendered catalog is invalid.

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

error: error rendering new refs: render reference "registry.redhat.io/redhat/redhat-operator-index:v4.12": error resolving name : pulling from host registry.redhat.io failed with status code [manifests v4.12]: 401 Unauthorized

And I'm facing this issue only when creating OCP 4.12 cluster and for OCP 4.14, it works fine.
Also I had followed this solution but it still didn't work for me.
Can anyone help me on this issue?

cat /tmp/olm-manifests/airgap12t/imageset-config.yaml
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
  registry:
    imageURL: us-svl-registry.fyre.ibm.com/olm-mirror
mirror:
  platform:
    channels:
    - name: stable-4.12
      type: ocp
    graph: false                                                     
  operators:
  - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12
    packages:
    - name: advanced-cluster-management
    - name: local-storage-operator
    - name: mcg-operator
    - name: multicluster-engine
    - name: ocs-operator
    - name: odf-csi-addons-operator
    - name: odf-multicluster-orchestrator
    - name: odf-operator
    - name: odr-cluster-operator
    - name: odr-hub-operator
    - name: openshift-cert-manager-operator
    - name: openshift-gitops-operator
    - name: redhat-oadp-operator
  additionalImages:
  - name: registry.redhat.io/ubi8/ubi:latest
  helm: {}

Attach the relevant portions of your .oc-mirror.log.

image

What did you expect to happen?

oc-mirror command needs to work properly and need to mirror all images to registry server

oc mirror --config=/tmp/olm-manifests/airgap12t/imageset-config.yaml docker://us-svl-registry.fyre.ibm.com/olm-mirror --max-per-registry=1 --skip-cleanup --ignore-history

Anything else we need to know?

I'm using podman

podman version
Client:       Podman Engine
Version:      4.9.4-rhel
API Version:  4.9.4-rhel
Go Version:   go1.21.7 (Red Hat 1.21.7-1.el9)
Built:        Mon Apr 15 05:33:08 2024
OS/Arch:      linux/amd64

References

Enter text here.

@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 5, 2024
@herzcthu
Copy link

herzcthu commented Sep 6, 2024

I'm having same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

3 participants