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

oc-mirror throws error when performing delete operation with --generate

XMLWordPrintable

    • Moderate
    • None
    • CLID Sprint 259
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      With oc-mirror v2 Tech Preview, when using the delete functionality to delete operator catalogs from mirror registries, the deletion was failing with an error message :
      2024/08/02 12:18:03 [ERROR] : [OperatorImageCollector] pinging container registry localhost:55000: Get "https://localhost:55000/v2/": http: server gave HTTP response to HTTPS client
      This is because oc-mirror was trying to determine the image digest associated with the catalog image reference by querying the local cache in HTTPS instead of HTTP.
      This is now fixed by configuring the HTTP client correctly prior to query.
      Show
      With oc-mirror v2 Tech Preview, when using the delete functionality to delete operator catalogs from mirror registries, the deletion was failing with an error message : 2024/08/02 12:18:03 [ERROR] : [OperatorImageCollector] pinging container registry localhost:55000: Get " https://localhost:55000/v2/ ": http: server gave HTTP response to HTTPS client This is because oc-mirror was trying to determine the image digest associated with the catalog image reference by querying the local cache in HTTPS instead of HTTP. This is now fixed by configuring the HTTP client correctly prior to query.
    • Bug Fix
    • In Progress

      Description of problem:

      When user tries to run oc-mirror delete command with --generate after a (M2D + D2M) it fails with error below
      2024/08/02 12:18:03  [ERROR]  : [OperatorImageCollector] pinging container registry localhost:55000: Get "https://localhost:55000/v2/": http: server gave HTTP response to HTTPS client
      2024/08/02 12:18:03  [ERROR]  : [OperatorImageCollector] pinging container registry localhost:55000: Get "https://localhost:55000/v2/": http: server gave HTTP response to HTTPS client
      2024/08/02 12:18:03  [ERROR]  :  pinging container registry localhost:55000: Get "https://localhost:55000/v2/": http: server gave HTTP response to HTTPS client
          

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

          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.17.0-202407302009.p0.gdbf115f.assembly.stream.el9-dbf115f", GitCommit:"dbf115f547a19f12ab72e7b326be219a47d460a0", GitTreeState:"clean", BuildDate:"2024-07-31T00:37:18Z", GoVersion:"go1.22.5 (Red Hat 1.22.5-1.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
      
          

      How reproducible:

           Always
          

      Steps to Reproduce:

          1. Download latest oc-mirror binary
          2. Use the ImageSetCofig below and perform (M2D + D2M)
          3. oc-mirror -c config.yaml file://CLID-136 --v2
          4. oc-mirror -c config.yaml --from file://CLID-136 --v2 docker://localhost:5000 --dest-tls-verify=false
          5. Now create deleteImageSetConfig as shown below and run delete command with --generate
           6. oc-mirror delete -c delete-config.yaml --generate --workspace file://CLID-136-delete docker://localhost:5000 --v2
          

      Actual results:

          Below errors are seen
          2024/08/02 12:18:03  [ERROR]  : [OperatorImageCollector] pinging container registry localhost:55000: Get "https://localhost:55000/v2/": http: server gave HTTP response to HTTPS client
      2024/08/02 12:18:03  [ERROR]  : [OperatorImageCollector] pinging container registry localhost:55000: Get "https://localhost:55000/v2/": http: server gave HTTP response to HTTPS client
      2024/08/02 12:18:03  [ERROR]  :  pinging container registry localhost:55000: Get "https://localhost:55000/v2/": http: server gave HTTP response to HTTPS client
          

      Expected results:

          No errors should be seen
          

      Additional info:

          This error is resolved upon using  --src-tls-verify=false with the oc-mirror delete --generate command
         More details in the slack thread here https://redhat-internal.slack.com/archives/C050P27C71S/p1722601331671649?thread_ts=1722597021.825099&cid=C050P27C71S
          

              skhoury@redhat.com Sherine Khoury
              knarra@redhat.com Rama Kasturi Narra
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: