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

Delete feature does not delete the graph image after mirrorToMirror

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.18.0
    • oc-mirror
    • None
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When running the delete command on oc-mirror after a mirrorToMirror, the graph-image is not being deleted.
          

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

          

      How reproducible:
      With the following ImageSetConfiguration (use the same for the DeleteImageSetConfiguration only changing the kind and the mirror to delete)

      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        platform:
          channels:
          - name: stable-4.13
            minVersion: 4.13.10
            maxVersion: 4.13.10
          graph: true
          

      Steps to Reproduce:

          1. Run mirror to mirror
      ./bin/oc-mirror -c ./alex-tests/alex-isc/isc.yaml --workspace file:///home/aguidi/go/src/github.com/aguidirh/oc-mirror/alex-tests/clid-230 docker://localhost:6000 --v2 --dest-tls-verify=false
      
          2. Run the delete --generate
      ./bin/oc-mirror delete -c ./alex-tests/alex-isc/isc-delete.yaml --generate --workspace file:///home/aguidi/go/src/github.com/aguidirh/oc-mirror/alex-tests/clid-230 --delete-id clid-230-delete-test docker://localhost:6000 --v2 --dest-tls-verify=false
      
          3. Run the delete
      ./bin/oc-mirror delete --delete-yaml-file /home/aguidi/go/src/github.com/aguidirh/oc-mirror/alex-tests/clid-230/working-dir/delete/delete-images-clid-230-delete-test.yaml docker://localhost:6000 --v2 --dest-tls-verify=false
          

      Actual results:

      During the delete --generate the graph-image is not being included in the delete file 
      
      2024/10/25 09:44:21  [WARN]   : unable to find graph image in local cache: SKIPPING. %!v(MISSING)
      2024/10/25 09:44:21  [WARN]   : reading manifest latest in localhost:55000/openshift/graph-image: manifest unknown
      
      Because of that the graph-image is not being deleted from the target registry
      
      [aguidi@fedora oc-mirror]$ curl http://localhost:6000/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  15577      0 --:--:-- --:--:-- --:--:-- 17000
      {
        "name": "openshift/graph-image",
        "tags": [
          "latest"
        ]
      }
          

      Expected results:

      graph-image should be deleted even after mirrorToMirror
          

      Additional info:

          

              luzuccar@redhat.com Luigi Mario Zuccarelli
              rh-ee-aguidi Alex Guidi
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: