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

[oc-mirror][v2]DiskToMirror should not require internet access

XMLWordPrintable

    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, when using oc-mirror v2 (Technology Preview) in Mirror-to-Disk mode, catalog images and contents were stored in `subfolders` under `working-dir`, based on the image digest. During the Disk-to-Mirror process in fully disconnected environments, oc-mirror tried to resolve the catalog image tag through the source registry, which was unavailable, leading to such errors:
      [source.terminal]
      ----
      [ERROR] : [OperatorImageCollector] pinging container registry registry.redhat.io: Get "http://registry.redhat.io/v2/": dial tcp 23.217.255.152:80: i/o timeout
      ----
      With this update, oc-mirror checks the local cache during the Disk-to-Mirror process to determine the digest, avoiding the need to query the registry.
      (link:https://issues.redhat.com/browse/OCPBUGS-36214[*OCPBUGS-36214*])
      Show
      Previously, when using oc-mirror v2 (Technology Preview) in Mirror-to-Disk mode, catalog images and contents were stored in `subfolders` under `working-dir`, based on the image digest. During the Disk-to-Mirror process in fully disconnected environments, oc-mirror tried to resolve the catalog image tag through the source registry, which was unavailable, leading to such errors: [source.terminal] ---- [ERROR] : [OperatorImageCollector] pinging container registry registry.redhat.io: Get " http://registry.redhat.io/v2/ ": dial tcp 23.217.255.152:80: i/o timeout ---- With this update, oc-mirror checks the local cache during the Disk-to-Mirror process to determine the digest, avoiding the need to query the registry. (link: https://issues.redhat.com/browse/OCPBUGS-36214 [* OCPBUGS-36214 *])
    • Bug Fix
    • Done

      Description of problem:

      When running oc-mirror diskToMirror in an air-gapped environment, we get a connection timeout to internet facing registries.    

      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.16.0-202406131906.p0.g7c0889f.assembly.stream.el9-7c0889f", GitCommit:"7c0889f4bd343ccaaba5f33b7b861db29b1e5e49", GitTreeState:"clean", BuildDate:"2024-06-13T22:07:44Z", GoVersion:"go1.21.9 (Red Hat 1.21.9-1.el9_4) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"    

      How reproducible:

          Always

      Steps to Reproduce:

          1.use the following imagesetconfig
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        operators:
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15
          packages:
          - name: 3scale-operator
        additionalImages: 
        - name: registry.redhat.io/ubi8/ubi:latest
          2. Perform a MirrorToDisk on a system with internet connection
          3. Cut off internet connection
          4. Perform a diskToMirror from the folder containing the archive
          

      Actual results:

      2024/06/26 13:09:53  [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/06/26 13:09:53  [INFO]   : 👋 Hello, welcome to oc-mirror
      2024/06/26 13:09:53  [INFO]   : ⚙️  setting up the environment for you...
      2024/06/26 13:09:53  [INFO]   : 🔀 workflow mode: diskToMirror 
      2024/06/26 13:10:00  [INFO]   : 🕵️  going to discover the necessary images...
      2024/06/26 13:10:00  [INFO]   : 🔍 collecting release images...
      2024/06/26 13:10:00  [INFO]   : 🔍 collecting operator images...
      2024/06/26 13:12:01  [ERROR]  : [OperatorImageCollector] pinging container registry registry.redhat.io: Get "http://registry.redhat.io/v2/": dial tcp 23.217.255.152:80: i/o timeout
      2024/06/26 13:12:01  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      error closing log file registry.log: close /home/ec2-user/entreprise-content/working-dir/logs/registry.log: file already closed
      2024/06/26 13:12:01  [ERROR]  : pinging container registry registry.redhat.io: Get "http://registry.redhat.io/v2/": dial tcp 23.217.255.152:80: i/o timeout  

      Expected results:

          Successful mirroring, even without access to the public internet

      Additional info:

          

              luzuccar@redhat.com Luigi Mario Zuccarelli
              skhoury@redhat.com Sherine Khoury
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: