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

[release-4.17] oc-mirror throws error when performing delete operation with --generate

XMLWordPrintable

    • Moderate
    • None
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, when using the delete functionality in oc-mirror v2 Tech Preview to remove operator catalogs from mirror registries, the process failed with the following error:
      [source,terminal]
      ----
      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 occurred because oc-mirror was querying the local cache using HTTPS instead of HTTP. With this update, the HTTP client is now properly configured before the query, resolving the issue.

      (link:https://issues.redhat.com/browse/OCPBUGS-41503[*OCPBUGS-41503*])
      Show
      Previously, when using the delete functionality in oc-mirror v2 Tech Preview to remove operator catalogs from mirror registries, the process failed with the following error: [source,terminal] ---- 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 occurred because oc-mirror was querying the local cache using HTTPS instead of HTTP. With this update, the HTTP client is now properly configured before the query, resolving the issue. (link: https://issues.redhat.com/browse/OCPBUGS-41503 [* OCPBUGS-41503 *])
    • Bug Fix
    • Done

      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
          

            luzuccar@redhat.com Luigi Mario Zuccarelli
            knarra@redhat.com Rama Kasturi Narra
            ying zhou ying zhou
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: