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

when use `shortestPath: true` for ocp release mirror for v2 , will lead to wrong counted images numbers

XMLWordPrintable

    • Important
    • None
    • CLID Sprint 254
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • Done
    • Customer Facing

      Description of problem:

      When use `shortestPath: true` the mirror images numbers is too many then the required. 

       

       

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

      ./oc-mirror version --output=yaml
      clientVersion:
        buildDate: "2024-05-08T04:26:09Z"
        compiler: gc
        gitCommit: 9e77c1944f70fed0a85e5051c8f3efdfb09add70
        gitTreeState: clean
        gitVersion: 4.16.0-202405080039.p0.g9e77c19.assembly.stream.el9-9e77c19
        goVersion: go1.21.9 (Red Hat 1.21.9-1.el9_4) X:strictfipsruntime
        major: ""
        minor: ""
        platform: linux/amd64

      How reproducible:

      always

      Steps to Reproduce:

      1) Use following isc to do mirror2mirror for v2:   
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      archiveSize: 8
      mirror:
        platform:
          channels:
          - name: stable-4.15                                             
            type: ocp
            minVersion: '4.15.11'
            maxVersion: '4.15.11'
            shortestPath: true
          graph: true   `oc-mirror --config config.yaml --v2 docker://xxx.com:5000/m2m  --workspace file:///app1/0416/clid20/`
      
      `oc-mirror --config config.yaml docker://localhost:5000 --dest-use-http`
      
      2) without the shortest path : 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        platform:
          channels:
            - name: stable-4.15

       

      Actual results: 

      1) It counted 577 images to mirror 
      oc-mirror --config config-11.yaml  file://outsizecheck --v2
      
      2024/05/11 03:57:21  [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/05/11 03:57:21  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/05/11 03:57:21  [INFO]   : ⚙️  setting up the environment for you...
      2024/05/11 03:57:21  [INFO]   : 🔀 workflow mode: mirrorToDisk 
      2024/05/11 03:57:21  [INFO]   : 🕵️  going to discover the necessary images...
      2024/05/11 03:57:21  [INFO]   : 🔍 collecting release images...
      2024/05/11 03:57:28  [INFO]   : 🔍 collecting operator images...
      2024/05/11 03:57:28  [INFO]   : 🔍 collecting additional images...
      2024/05/11 03:57:28  [INFO]   : 🚀 Start copying the images...
      2024/05/11 03:57:28  [INFO]   : === Overall Progress - copying image 1 / 577 ===
      2024/05/11 03:57:28  [INFO]   : copying release image 1 / 577 
      
      
      
      
      2)  without the shortest path , only counted 192 images to mirror. 
      oc-mirror --config config-32547.yaml file://outsizecheck --v2
      
      2024/05/11 03:55:12  [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/05/11 03:55:12  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/05/11 03:55:12  [INFO]   : ⚙️  setting up the environment for you...
      2024/05/11 03:55:12  [INFO]   : 🔀 workflow mode: mirrorToDisk 
      2024/05/11 03:55:12  [INFO]   : 🕵️  going to discover the necessary images...
      2024/05/11 03:55:12  [INFO]   : 🔍 collecting release images...
      2024/05/11 03:55:12  [INFO]   : detected minimum version as 4.15.11
      2024/05/11 03:55:12  [INFO]   : detected minimum version as 4.15.11
      2024/05/11 03:55:18  [INFO]   : 🔍 collecting operator images...
      2024/05/11 03:56:09  [INFO]   : 🔍 collecting additional images...
      2024/05/11 03:56:09  [INFO]   : 🚀 Start copying the images...
      2024/05/11 03:56:09  [INFO]   : === Overall Progress - copying image 1 / 266 ===
      2024/05/11 03:56:09  [INFO]   : copying release image 1 / 192

      Expected results:

      1) if only have one ocp payload, the image need mirrored should be same. 

      Additional information:

      
      

              skhoury@redhat.com Sherine Khoury
              yinzhou@redhat.com ying zhou
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: