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

v2 delete hit error when v1 set with targetCatalog and targetTag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 4.18
    • oc-mirror
    • Moderate
    • None
    • Rejected
    • 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 targetCatalog and targetTag for v1,  v2 delete failed to generate the delete image list : 
      2024/10/24 05:33:00  [ERROR]  : [OperatorImageCollector] reading manifest v16 in localhost:55000/ocicatalog73452: manifest unknown
      2024/10/24 05:33:00  [ERROR]  : [OperatorImageCollector] reading manifest v16 in localhost:55000/ocicatalog73452: manifest unknown
      2024/10/24 05:33:00  [ERROR]  : reading manifest v16 in localhost:55000/ocicatalog73452: manifest unknown

      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 catalogsource with set targetCatalog and targetTag for v1: kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      mirror:
        additionalImages: 
          - name: quay.io/openshifttest/hello-openshift@sha256:4200f438cf2e9446f6bcff9d67ceea1f69ed07a2f83363b7fb52529f7ddd8a83
        operators:
          - catalog: oci:///test/redhat-operator-index
            targetCatalog: "ocicatalog73452"
            targetTag: "v16"
            packages:
              - name: cluster-kube-descheduler-operator
       `oc-mirror -c config-oci-v1.yaml docker://localhost:5000 --dest-use-http`
      
      2.   mirror by v2 again: 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        additionalImages: 
          - name: quay.io/openshifttest/hello-openshift@sha256:4200f438cf2e9446f6bcff9d67ceea1f69ed07a2f83363b7fb52529f7ddd8a83
        operators:
          - catalog: oci:///test/redhat-operator-index
            targetCatalog: "ocicatalog73452"
            targetTag: "v16"
            packages:
              - name: cluster-kube-descheduler-operator
      
      
      `oc-mirror -c config-oci-v2.yaml file://v2m2mdry  --v2`
      `oc-mirror -c config-oci-v2.yaml --from file://v2m2mdry  --v2 docker://localhost:5000  --dest-tls-verify=false`
      
      3. generate the delete image list with config : 
      kind: DeleteImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      delete:
        additionalImages:
          - name: quay.io/openshifttest/hello-openshift@sha256:4200f438cf2e9446f6bcff9d67ceea1f69ed07a2f83363b7fb52529f7ddd8a83
        operators:
          - catalog: oci:///test/redhat-operator-index
            targetCatalog: "ocicatalog73452"
            targetTag: "v16"
            packages:
              - name: cluster-kube-descheduler-operator 
      
      `oc-mirror delete -c config-d-oci.yaml --generate --workspace file://v2m2mdry docker://localhost:5000  --v2 --dest-tls-verify=false`  
      
      

      Actual results:

      3. Failed to generate the delete image list:
      oc-mirror delete -c config-d-oci.yaml --generate --workspace file://v2m2mdry docker://localhost:5000  --v2 --dest-tls-verify=false2024/10/24 05:33:00  [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/10/24 05:33:00  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/10/24 05:33:00  [INFO]   : ⚙️  setting up the environment for you...
      2024/10/24 05:33:00  [INFO]   : 🔀 workflow mode: diskToMirror / delete
      2024/10/24 05:33:00  [INFO]   : 🕵️  going to discover the necessary images...
      2024/10/24 05:33:00  [INFO]   : 🔍 collecting release images...
      2024/10/24 05:33:00  [INFO]   : 🔍 collecting operator images...
      2024/10/24 05:33:00  [ERROR]  : [OperatorImageCollector] reading manifest v16 in localhost:55000/ocicatalog73452: manifest unknown
      2024/10/24 05:33:00  [ERROR]  : [OperatorImageCollector] reading manifest v16 in localhost:55000/ocicatalog73452: manifest unknown
      2024/10/24 05:33:00  [ERROR]  : reading manifest v16 in localhost:55000/ocicatalog73452: manifest unknown  

      Expected results:

       3. no error

      Additional info:

       
          

       

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

                Created:
                Updated: