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

Mirror should not hit error when delete the data under OC_MIRROR_CACHE

    XMLWordPrintable

Details

    • Important
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress
    • Customer Facing

    Description

      Description of problem:

      Mirror should not hit error when delete the OC_MIRROR_CACHE

       

      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:"4.16.0-202403070215.p0.gc4f8295.assembly.stream.el9-c4f8295", GitCommit:"c4f829512107f7d0f52a057cd429de2030b9b3b3", GitTreeState:"clean", BuildDate:"2024-03-07T03:46:24Z", GoVersion:"go1.21.7 (Red Hat 1.21.7-1.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

      always

      Steps to Reproduce:

      1) With following imagesetconfigure, do mirro2disk action
      
      cat config-s.yaml 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      mirror:
        additionalImages:
        - name: registry.gitlab.com/gitlab-org/build/cng/kubectl:v16.5.1
        - name: quay.io/openshifttest/hello-openshift@sha256:61b8f5e1a3b5dbd9e2c35fd448dc5106337d7a299873dd3a6f0cd8d4891ecc27
        helm: {}
      
      `oc-mirror --config config-f.yaml file://out --v2`
      
      2) Move the mirror tar file to other directories;
      3) Delete the OC_MIRROR_CACHE directory;
      4) Do  diskToMirror
      `oc-mirror --config config-s.yaml --from file://out docker://xxxx.com:5000/test19  --v2`

      Actual results: 

      4) the diskToMirror failed with error:
      oc-mirror --config config-s.yaml --from file://out docker://xxx.com:5000/test19  --v2
      --v2 flag identified, flow redirected to the oc-mirror v2 version. PLEASE DO NOT USE that. V2 is still under development and it is not ready to be used. 
      2024/03/21 04:01:37  [INFO]   : mode diskToMirror
      2024/03/21 04:01:37  [INFO]   : local storage registry will log to /app1/0319/out/working-dir/logs/registry.log
      ....
      2024/03/21 04:01:38  [INFO]   : completed batch 0
      2024/03/21 04:01:38  [ERROR]  : [Worker] errArray initializing source docker://localhost:55000/openshifttest/hello-openshift:61b8f5e1a3b5: reading manifest 61b8f5e1a3b5 in localhost:55000/openshifttest/hello-openshift: manifest unknown
      2024/03/21 04:01:38  [ERROR]  : [Worker] error in batch - refer to console log

      Expected results:

      4) The diskToMirror should not rely on the date under OC_MIRROR_CACHE.

      Attachments

        Issue Links

          Activity

            People

              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

              Dates

                Created:
                Updated: