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

v2 delete is not aware of storageConfig images mirrored by v1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.18
    • oc-mirror
    • Moderate
    • None
    • Proposed
    • 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 storageConfig as registry for v1,  after delete , the metadata related images still remain

      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:"v0.2.0-alpha.1-309-g63a5556", GitCommit:"63a5556a", GitTreeState:"clean", BuildDate:"2024-10-23T02:42:55Z", GoVersion:"go1.23.0", 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
      storageConfig: 
       registry:
         imageURL: localhost:5000/oc-mirror
         skipTLS: true mirror:
        platform:
          graph: true
          channels:
          - name: stable-4.15
      `oc-mirror -c config-v1.yaml docker://localhost:5000/m2m --dest-use-http`
      
      2.   mirror ocp with graph==true for v2 by dry-run with the same path:
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        platform:
          graph: true
          channels:
          - name: stable-4.15
      `oc-mirror -c config-v2.yaml --workspace file://wsdry-run 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://wsdry-run docker://localhost:5000/m2m --v2 --dest-tls-verify=false`  
      
      4. Execute the delete action: 
      
      `oc-mirror delete --delete-yaml-file  wsdry-run/working-dir/delete/delete-images.yaml docker://localhost:5000/m2m --v2 --dest-tls-verify=false` 

      Actual results:

      4.  All the metadata images for storageConfig remained, because v2 is not aware of it. 

      Expected results:

       4. Could also delete image about the metadata      

      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: