Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-52515

OCP 4.16 "openshift-install agent create image" returns "error: unable to read image quay.io" in disconnected env

XMLWordPrintable

    • Low
    • None
    • Agent Sprint 267, Agent Sprint 268
    • 2
    • False
    • Hide

      None

      Show
      None
    • Removed erroneous error message regarding "unable to read image" when building the agent ISO in a disconnected setup.
    • Bug Fix
    • In Progress

      This is a clone of issue OCPBUGS-50637. The following is the description of the original issue:

      Description of problem:

      Using the same registry, oc and oc-mirror 4.16 versions but different installer versions in different directory structures, 4.16 returns the following error while generating the ISO file while 4.14 does not:
      
      DEBUG Using internal constant for release image quay.io/openshift-release-dev/ocp-release@sha256:0e71cb61694473b40e8d95f530eaf250a62616debb98199f31b4034808687dae 
      ERROR Release Image arch could not be found: command '[oc adm release info quay.io/openshift-release-dev/ocp-release@sha256:0e71cb61694473b40e8d95f530eaf250a62616debb98199f31b4034808687dae -o=go-template={{if and .metadata.metadata (index . "metadata" "metadata" "release.openshift.io/architecture")}}{{index . "metadata" "metadata" "release.openshift.io/architecture"}}{{else}}{{.config.architecture}}{{end}} --insecure=true --registry-config=/tmp/registry-config2248417039]' exited with non-zero exit code 1:  
      ERROR error: unable to read image quay.io/openshift-release-dev/ocp-release@sha256:0e71cb61694473b40e8d95f530eaf250a62616debb98199f31b4034808687dae: Get "http://quay.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 
      ERROR                                              
      WARNING Unable to validate the release image architecture, skipping validation
      
      This is valid for disconnected environments. This doesn't affect creating the image, it's more a cosmetic error. The ISO file is still being created and works as expected.

      Version-Release number of selected component (if applicable):

      openshift-install-linux-4.16

      How reproducible:

      ./openshift-install agent create image --dir=./abi/ --log-level=debug

      Steps to Reproduce:

      1. Create 2 directory structures ocp4.14 and ocp4.16
      2. Get from mirror.openshift.com oc client, oc-mirror for OCP 4.16 and openshift-install for both 4.14 and 4.16
      3. Clone catalogs for both versions 4.14 and 4.16 to private registry
      4. Use same install-config.yaml and agent-config.yaml for both "openshift-install agent create image" command with different versions

      Actual results:

      Error shows up for version 4.16

      Expected results:

      No error should show as in version 4.14

      Additional info:

      There are logs and config files in linked case.
      I'm attaching here the files and logs from my own reproduction.    

              bfournie@redhat.com Robert Fournier
              openshift-crt-jira-prow OpenShift Prow Bot
              zhenying niu zhenying niu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: