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

Can't delete the graph-image when mirror by mirror2mirror mode with dry-run

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.18
    • oc-mirror
    • Moderate
    • None
    • CLID Sprint 264
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      *Cause*: What actions or circumstances cause this bug to present.
      *Consequence*: What happens when the bug presents.
      *Fix*: What was done to fix the bug.
      *Result*: Bug doesn’t present anymore.
      Show
      *Cause*: What actions or circumstances cause this bug to present. *Consequence*: What happens when the bug presents. *Fix*: What was done to fix the bug. *Result*: Bug doesn’t present anymore.
    • Bug Fix
    • In Progress

      Description of problem:

      When set graph==true for v2 and do mirror2mirror ,when to generate the delete image list, will hit error :
      2024/11/19 03:04:28  [WARN]   : unable to find graph image in local cache: SKIPPING. %!v(MISSING)
      2024/11/19 03:04:28  [WARN]   : reading manifest latest in localhost:55000/openshift/graph-image: manifest unknown

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

      ./oc-mirror.rhel8 version 
      W1119 03:24:06.049513   39945 mirror.go:102] ⚠️  oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2WARNING: 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.18.0-202411142011.p0.ga584979.assembly.stream.el9-a584979", GitCommit:"a58497986231f7871d063c8886a59b7e0ed569e9", GitTreeState:"clean", BuildDate:"2024-11-15T05:00:05Z", GoVersion:"go1.22.7 (Red Hat 1.22.7-1.module+el8.10.0+22325+dc584f75) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

           Always
          

      Steps to Reproduce:

      1.  mirror ocp with graph==true for v1 :
      kind: ImageSetConfiguration 
      apiVersion: mirror.openshift.io/v1alpha2 
      mirror:
       platform: 
         graph: true 
         channels:  
         - name: stable-4.15
      
      2.   mirror ocp with graph==true for v2 by mirror2mirror and dry-run:
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        platform:
          graph: true
          channels:
          - name: stable-4.15
      `oc-mirror -c config-v2.yaml --workspace file://ws docker://localhost:5000/m2m --v2 --dest-tls-verify=false  --dry-run`
      
      3. generate the delete image list with config :
      kind: DeleteImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      delete:
        platform:
          graph: true
          channels:
          - name: stable-4.15
      
      `oc-mirror -c config-d-v2.yaml delete --generate --workspace file://ws docker://localhost:5000/m2m --v2 --dest-tls-verify=false`  
      
      4. Execute the delete action: 
      
      `oc-mirror delete --delete-yaml-file  ws/working-dir/delete/delete-images.yaml docker://localhost:5000/m2m --v2 --dest-tls-verify=false` 

      Actual results:

      2.  Hit error when generate the delete image list:
      ./oc-mirror.rhel8 delete -c config-d-v2.yaml  --generate --workspace file://wsdry-run docker://localhost:5000 --v2 --dest-tls-verify=false2024/11/19 03:04:28  [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/11/19 03:04:28  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/11/19 03:04:28  [INFO]   : ⚙️  setting up the environment for you...
      2024/11/19 03:04:28  [INFO]   : 🔀 workflow mode: diskToMirror / delete
      2024/11/19 03:04:28  [INFO]   : 🕵️  going to discover the necessary images...
      2024/11/19 03:04:28  [INFO]   : 🔍 collecting release images...
      2024/11/19 03:04:28  [WARN]   : unable to find graph image in local cache: SKIPPING. %!v(MISSING)
      2024/11/19 03:04:28  [WARN]   : reading manifest latest in localhost:55000/openshift/graph-image: manifest unknown
      2024/11/19 03:04:28  [INFO]   : 🔍 collecting operator images...
      2024/11/19 03:04:28  [INFO]   : 🔍 collecting additional images...
      2024/11/19 03:04:28  [INFO]   : 🔍 collecting helm images...
      2024/11/19 03:04:28  [INFO]   : 📄 Generating delete file...
      2024/11/19 03:04:28  [INFO]   : wsdry-run/working-dir/delete file created
      2024/11/19 03:04:28  [INFO]   : delete time     : 16.597995ms
      2024/11/19 03:04:28  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      
      3. execute the delete , could see not delete the graph-image :
      curl http://localhost:5000/v2/openshift/graph-image/tags/list | jq
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100    51  100    51    0     0  20400      0 --:--:-- --:--:-- --:--:-- 25500
      {
        "name": "openshift/graph-image",
        "tags": [
          "latest"
        ]
      }

      Expected results:

       the graph-delete should not delay on the local cache, should be able to delete the mirror2mirror mode.

      Additional info:

       
          

       

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

                Created:
                Updated: