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

oc-mirror rebuild catalog failed for oci catalog when run the same command twice

XMLWordPrintable

    • Moderate
    • None
    • CLID Sprint 263
    • 1
    • 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 run the oc-mirror command twice , the rebuild catalog failed with error:
      [ERROR]  : unable to rebuild catalog oci:///test/yinzhou/out20/working-dir/operator-catalogs/redhat-operator-index/33dd53f330f4518bd0427772debd3331aa4e21ef4ff4faeec0d9064f7e4f24a9/catalog-image: filtered declarative config not found
      
      

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

       oc-mirror version 
      W1120 10:40:11.056507    6751 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:"v0.2.0-alpha.1-324-gbae91d5", GitCommit:"bae91d55", GitTreeState:"clean", BuildDate:"2024-11-20T02:06:04Z", GoVersion:"go1.23.0", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

           Always
          

      Steps to Reproduce:

      1. run the mirror2mirror twice with same imageseconfig and same workspace, the twice command failed with error:
      cat config-20.yaml 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        additionalImages:
        - name: registry.redhat.io/ubi8/ubi:latest
        - name: quay.io/openshifttest/hello-openshift@sha256:61b8f5e1a3b5dbd9e2c35fd448dc5106337d7a299873dd3a6f0cd8d4891ecc27
        operators:
        - catalog: oci:///test/redhat-operator-index
          packages:
          - name: aws-load-balancer-operator
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15
          packages:
          - name: devworkspace-operator
      
      `oc-mirror -c config-20.yaml docker://my-route-e2e-test-ocmirrorv2-pxbg4.apps.yinzhou11202.qe.devcluster.openshift.com --workspace file://out20 --v2 --dest-tls-verify=false`

       

      Actual results:

      oc-mirror -c config-20.yaml docker://my-route-e2e-test-ocmirrorv2-pxbg4.apps.yinzhou11202.qe.devcluster.openshift.com --workspace file://out20 --v2 --dest-tls-verify=false2024/11/20 10:34: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/11/20 10:34:00  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/11/20 10:34:00  [INFO]   : ⚙️  setting up the environment for you...
      2024/11/20 10:34:00  [INFO]   : 🔀 workflow mode: mirrorToMirror 
      2024/11/20 10:34:00  [INFO]   : 🕵️  going to discover the necessary images...
      2024/11/20 10:34:00  [INFO]   : 🔍 collecting release images...
      2024/11/20 10:34:00  [INFO]   : 🔍 collecting operator images...
       ✓   () Collecting catalog oci:///test/redhat-operator-index 
       ✓   (2s) Collecting catalog registry.redhat.io/redhat/redhat-operator-index:v4.15 
      2024/11/20 10:34:02  [INFO]   : 🔍 collecting additional images...
      2024/11/20 10:34:02  [INFO]   : 🔍 collecting helm images...
      2024/11/20 10:34:02  [INFO]   : 🔂 rebuilding catalogs
      2024/11/20 10:34:02  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      2024/11/20 10:34:02  [ERROR]  : unable to rebuild catalog oci:///test/yinzhou/out20/working-dir/operator-catalogs/redhat-operator-index/33dd53f330f4518bd0427772debd3331aa4e21ef4ff4faeec0d9064f7e4f24a9/catalog-image: filtered declarative config not found 

      Expected results:

      no error

      Additional info:

      delete the workspace file , run again, no issue.

       

              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: