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

[v2]diskToMirror on disconnected env --from option has not checked whether the folder exists, or the tar file in the folder

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • CLID Sprint 273, CLID Sprint 274
    • 2
    • Done
    • Bug Fix
    • Hide
      * Before this update, when you ran the oc-mirror v2 disk-to-mirror workflow without valid mirror tar files, the returned error messages did not correctly identify the problem. With this release, the oc-mirror v2 workflow returns an error message that states `no tar archives matching "mirror_[0-9]{6}\.tar" found in "<directory>"`. (link:https://issues.redhat.com/browse/OCPBUGS-59235[OCPBUGS-59235])
      Show
      * Before this update, when you ran the oc-mirror v2 disk-to-mirror workflow without valid mirror tar files, the returned error messages did not correctly identify the problem. With this release, the oc-mirror v2 workflow returns an error message that states `no tar archives matching "mirror_[0-9]{6}\.tar" found in "<directory>"`. (link: https://issues.redhat.com/browse/OCPBUGS-59235 [ OCPBUGS-59235 ])
    • None
    • None
    • None
    • None

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

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

      Description of problem:

       oc-mirror disktoMirror on disconnected env --from option have not check the folder is existed, or the tar file in the folder

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

      4.20

      How reproducible:

         Always 

      Steps to Reproduce:

      on air env (have not internet)
          1.oc-mirror --from file://test (have not test folder)
          2.oc-mirror --from file://test (have not tar file in the test folder)
      
          

      Actual results:

      $ ./oc-mirror -c isc.yaml --from file://test1 docker://maxu-image.mirror-registry.private-ibmcloud.qe.devcluster.openshift.com:5000 --v2 --dest-tls-verify=false --parallel-images 8 --retry-delay 2s --retry-times 2
      2025/06/27 10:21:45  [INFO]   : 👋 Hello, welcome to oc-mirror
      2025/06/27 10:21:45  [INFO]   : ⚙️  setting up the environment for you...
      2025/06/27 10:21:45  [INFO]   : 🔀 workflow mode: diskToMirror 
      2025/06/27 10:21:45  [INFO]   : 📦 Extracting mirror archive(s)...
      2025/06/27 10:21:45  [INFO]   : 🕵  going to discover the necessary images...
      2025/06/27 10:21:45  [INFO]   : 🔍 collecting release images...
      2025/06/27 10:21:45  [INFO]   : 🔍 collecting operator images...
       ✗   () Collecting catalog registry.redhat.io/redhat/redhat-operator-index:v4.18 
      2025/06/27 10:21:45  [INFO]   : 🔍 collecting additional images...
      2025/06/27 10:21:45  [INFO]   : 🔍 collecting helm images...
      2025/06/27 10:21:45  [INFO]   : mirror time     : 101.265719ms
      2025/06/27 10:21:45  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      2025/06/27 10:21:45  [ERROR]  : [Executor] collection error: collect catalog "registry.redhat.io/redhat/redhat-operator-index:v4.18": get manifest: error when creating a new image source: reading manifest v4.18 in localhost:55000/redhat/redhat-operator-index: manifest unknown 
      

      Expected results:

      prompt fail to find the folder     
      or fail to find tar file in the folder

      Additional info:

      not in the disconnect env, the error message is clear
      [ERROR]  : [Executor] collection error: [GetReleaseReferenceImages] no release images found  

              rdossant Rafael Fonseca dos Santos
              openshift-crt-jira-prow OpenShift Prow Bot
              None
              None
              May Xu May Xu
              None
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: