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

oc-mirror give more clear information when check metadata sequence hit error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.14.0
    • oc-mirror
    • Low
    • No
    • False
    • Hide

      None

      Show
      None
    • NA
    • Done

      Description of problem:

      When oc-mirror check the metadata sequence failed should give more clear error information 

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

      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.14.0-202306081549.p0.g063e0bb.assembly.stream-063e0bb", GitCommit:"063e0bbb222b37ac8183ef9dfbdb32f6541092a0", GitTreeState:"clean", BuildDate:"2023-06-08T16:16:33Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}
       

      How reproducible:

      always 
       

      Steps to Reproduce:

      1) with ImageSetconfigure : 
      apiVersion: mirror.openshift.io/v1alpha2
      kind: ImageSetConfiguration
      storageConfig:
        local:
          path: /tmp/14194
      mirror:
        operators:
          - catalog: oci:///home/ocmirrortest/noo/redhat-operator-index
            packages:
              - name: node-healthcheck-operator
      run command : 
      `oc-mirror --config config.yaml docker://localhost:5000 --dest-use-http  --include-local-oci-catalogs`
      2) copy the metadata to other : 
        `cp /tmp/14194  /tmp/14194-back1
      3) Update the ImageSetConfigure :
      apiVersion: mirror.openshift.io/v1alpha2
      kind: ImageSetConfiguration
      storageConfig:
        local:
          path: /tmp/14194
      mirror:
        operators:
          - catalog: oci:///home/ocmirrortest/noo/redhat-operator-index
            packages:
              - name: node-healthcheck-operator
              - name: node-observability-operator
      run command :
      `oc-mirror --config config.yaml docker://localhost:5000 --dest-use-http  --include-local-oci-catalogs`
      3)  copy the latest metadata to other and restore the first time metadata :
           cp /tmp/14194 /tmp/14194-back2
           rm /tmp/14194 
           cp /tmp/14194-back1 /tmp/14194
      4) Update ImageSetConfigure again :
      apiVersion: mirror.openshift.io/v1alpha2
      kind: ImageSetConfiguration
      storageConfig:
        local:
          path: /tmp/14194
      mirror:
        operators:
          - catalog: oci:///home/ocmirrortest/noo/redhat-operator-index
            packages:
              - name: node-healthcheck-operator
              - name: node-observability-operator
              - name: external-dns-operator
      run command : 
      `oc-mirror --config config.yaml docker://localhost:5000 --dest-use-http  --include-local-oci-catalogs`
      

      Actual results:

      oc-mirror --config config.yaml docker://localhost:5000 --dest-use-http  --include-local-oci-catalogs
      Checking push permissions for localhost:5000
      Creating directory: oc-mirror-workspace/src/publish
      Creating directory: oc-mirror-workspace/src/v2
      Creating directory: oc-mirror-workspace/src/charts
      Creating directory: oc-mirror-workspace/src/release-signatures
      28 related images processed in 621.357µs
      Writing image mapping to oc-mirror-workspace/operators.1686550795/manifests-redhat-operator-index/mapping.txt
      error: mirror sequence is the same
       

      Expected results:

      Give more clear information. 
       

      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: