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

oc-mirror should fail when call the cincinatti API failed

XMLWordPrintable

    • Moderate
    • None
    • CLID Sprint 260
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      oc-mirror should fail when call the cincinatti API failed

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

      oc-mirror version WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version.Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.17.0-202407291514.p0.gdbf115f.assembly.stream.el9-dbf115f", GitCommit:"dbf115f547a19f12ab72e7b326be219a47d460a0", GitTreeState:"clean", BuildDate:"2024-07-29T15:52:52Z", GoVersion:"go1.22.4 (Red Hat 1.22.4-2.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

      100%

      Steps to Reproduce:

      1) Set squid proxy;
      2) use following imagesetconfig to mirror ocp:
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        platform:
          graph: true
          channels:
          - name: stable-4.15                                             
            type: ocp
            minVersion: '4.15.18'
            maxVersion: '4.15.18'
      
      oc-mirror -c config.yaml  file://out38037 --v2

      Actual results:

      2) oc-mirror failed to get cincinatti API, but oc-mirror  just log an error, state that 0 images to copy and continue
      
      oc-mirror -c config-38037.yaml  file://out38037 --v2
      
      2024/08/13 04:27:41  [WARN]   : ⚠️  --v2 flag identified, flow redirected to the oc-mirror v2 version. This is Tech Preview, it is still under development and it is not production ready.
      2024/08/13 04:27:41  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/08/13 04:27:41  [INFO]   : ⚙️  setting up the environment for you...
      2024/08/13 04:27:41  [INFO]   : 🔀 workflow mode: mirrorToDisk 
      2024/08/13 04:27:41  [INFO]   : 🕵️  going to discover the necessary images...
      2024/08/13 04:27:41  [INFO]   : 🔍 collecting release images...
      I0813 04:27:41.388376  203687 core-cincinnati.go:508] Using proxy 127.0.0.1:3128 to request updates from https://api.openshift.com/api/upgrades_info/v1/graph?arch=amd64&channel=stable-4.15&id=1454eaf7-7f41-4678-ae88-30d4957e24f9
      2024/08/13 04:27:41  [ERROR]  : get release images: error list APIRequestError: channel "stable-4.15": RemoteFailed: Get "https://api.openshift.com/api/upgrades_info/v1/graph?arch=amd64&channel=stable-4.15&id=1454eaf7-7f41-4678-ae88-30d4957e24f9": Forbidden 
      2024/08/13 04:27:41  [WARN]   : error during graph image processing - SKIPPING: Get "https://api.openshift.com/api/upgrades_info/graph-data": Forbidden
      2024/08/13 04:27:41  [INFO]   : 🔍 collecting operator images...
      2024/08/13 04:27:41  [INFO]   : 🔍 collecting additional images...
      2024/08/13 04:27:41  [INFO]   : 🚀 Start copying the images...
      2024/08/13 04:27:41  [INFO]   : images to copy 0 
      2024/08/13 04:27:41  [INFO]   : === Results ===
      2024/08/13 04:27:41  [INFO]   : 📦 Preparing the tarball archive...
      2024/08/13 04:27:41  [INFO]   : mirror time     : 464.620593ms
      2024/08/13 04:27:41  [INFO]   : 👋 Goodbye, thank you for using oc-mirror

       

       

      Expected results:

      when Cincinatti API is not reacheable (api.openshift.com), oc-mirror should fail immediately

       

              luzuccar@redhat.com Luigi Mario Zuccarelli
              yinzhou@redhat.com ying zhou
              Rama Kasturi Narra Rama Kasturi Narra
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: