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

oc-mirror v2: exit when invalid combination of CLI flags detected

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.20, 4.21
    • oc-mirror
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • x86_64
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          Invalid combination of flags causes confusing error messages

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

          4.21.0-202601130153.p2.g90ed49c.assembly.stream.el9-90ed49c

      How reproducible:

          100%

      Steps to Reproduce:

          1.Follow the m2d process to pull images
          2.Attempt to follow the d2m process with the following command
      
      oc-mirror --v2 -c isc.yaml --log-level=debug --authfile=auth.json --cache-dir=/data/working/cache2 --from file:///data/working/mirror2 docker://myregistry.com:8443/ocp
      
          3.oc-mirror errors out
          

      Actual results:

          Error:2026/02/17  13:45::16  [ERROR]   :  [Executor] collection error:  http request Get "https://mirror.openshift.com/pub/openshift-v4/signatures/openshift/release/sha256=xxxxxxxxxxxxxxxxxxxxx/signature-1": dial tcp:  lookup mirror.openshift.com on 10.10.10.68:53: no such host

      Expected results:

          oc-mirror could recognize that this combination of flags is invalid

      Additional info:

          The customer was unfamiliar with the oc mirror process. They moved over the entire working-dir to their offline environment instead of just copying the tarball files.
      
      
      Since oc-mirror supports m2d, d2m, and m2m, I'm not 100% if we can detect that this is an invalid set of CLI flags or if oc-mirror would set the cache dir arg with the other args and exit saying this combination is arbitrary or invalid.

              rh-ee-aguidi Alex Guidi
              dan5179 Dan Clark
              None
              None
              Nidan Gavali Nidan Gavali
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: