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

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

XMLWordPrintable

    • No
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously when using oc-mirror v2 in MirrorToDisk, the catalog image and contents are stored under a subfolder under working-dir corresponding to the digest of the image.
          Then, while doing diskToMirror, oc-mirror attempts to call the source registry to resolve the catalog image tag to a digest in order to find the corresponding subfolder on disk.

      When diskToMirror is happening on a fully disconnected environment, there is no access to the source registry. The following error happened:
      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

      With this fix, oc-mirror interrogates the local cache during the diskToMirror process in order to determine this digest.
      Show
      Previously when using oc-mirror v2 in MirrorToDisk, the catalog image and contents are stored under a subfolder under working-dir corresponding to the digest of the image.     Then, while doing diskToMirror, oc-mirror attempts to call the source registry to resolve the catalog image tag to a digest in order to find the corresponding subfolder on disk. When diskToMirror is happening on a fully disconnected environment, there is no access to the source registry. The following error happened: 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 With this fix, oc-mirror interrogates the local cache during the diskToMirror process in order to determine this digest.
    • Bug Fix
    • In Progress

      This is a clone of issue OCPBUGS-36214. The following is the description of the original issue:

      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
              openshift-crt-jira-prow OpenShift Prow Bot
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: