Search code examples
kubernetesopenshiftdocker-registryokdquay.io

Why is OpenShift OC "unable to retrieve release image info" when trying to mirror the OKD installation images?


I have been working on getting ready for an installation of OKD on an air-gapped infrastructure. I have been following along with the procedures on OpenShift's documentation as well as this supplementary article (because I find the OpenShift documentation to be extremely unclear at certain points).

I have gotten to the point where I have set up my registry with certifications and a pull secret and I am attempting to mirror the images to the registry (which I will later transfer to the air-gapped environment).

The issue that I am having is that when I try to execute the command to mirror the images:

    oc adm -a ${LOCAL_SECRET_JSON} release mirror \
     --from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-${ARCHITECTURE} \
     --to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY} \
     --to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}-${ARCHITECTURE} --dry-run

I get the following error message:

error: unable to retrieve release image info: unable to load --registry-config: error occurred while trying to unmarshal json

I have tried searching for this error message in multiple ways, but I just can not find any reference to any specific part of the error message that helps me narrow down the issue.

I have tried to execute the command with and without the ${ARCHITECTURE} specified, as the OpenShift documentation specifies it and the alternate resource does not. Can anyone point me in the right direction as far as what might be causing this issue?

I am on a VM running Ubuntu 18.04.


Solution

  • The issue was with my pull_secret.json file. I had used the example from my alternate resource which had several auths with fields populated with ellipses. I thought this was normal. Once I changed the pull_secret to only include my mirror registry domain name, the process continued, albeit with a new error

    unauthorized: access to the requested resource is not authorized

    For the solution to my new error, please see this answer. In a nutshell, the documentation was instructing the user to pull from the wrong repository.