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

Failed to mirror ocp payload when use digest not the tag

    • Moderate
    • Yes
    • CLID Sprint 264, CLID Sprint 265
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, mirroring a release that used a digest instead of a tag did not work as expected. This issue has been fixed, ensuring successful mirroring for releases that use digests. (link:https://issues.redhat.com/browse/OCPBUGS-45249[*OCPBUGS-45249*])
      Show
      Previously, mirroring a release that used a digest instead of a tag did not work as expected. This issue has been fixed, ensuring successful mirroring for releases that use digests. (link: https://issues.redhat.com/browse/OCPBUGS-45249 [* OCPBUGS-45249 *])
    • Bug Fix
    • Done

      Description of problem:

      when mirror ocp payload with digest will failed with error : 
      invalid destination name docker://ci-op-n2k1twzy-c1a88-bastion-mirror-registry-xxxxxxxx-zhouy.apps.yinzhou-1031.qe.devcluster.openshift.com/ci-op-n2k1twzy/release/openshift/release-images:: invalid reference format

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

      ./oc-mirror.rhel8  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.18.0-202410251041.p0.g95f0611.assembly.stream.el9-95f0611", GitCommit:"95f0611c1dc9584a4a9e857912b9eaa539234bbc", GitTreeState:"clean", BuildDate:"2024-10-25T11:28:19Z", GoVersion:"go1.22.7 (Red Hat 1.22.7-1.module+el8.10.0+22325+dc584f75) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

           Always
          

      Steps to Reproduce:

      1. imagesetconfig with digest for ocp payload :
      cat config.yaml 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        platform:
          release: registry.ci.openshift.org/ocp/release@sha256:e87cdacdf5c575ff99d4cca7ec38758512a408ac1653fef8dd7b2c4b85e295f4
      
      2. run the mirror2mirror command :
      ./oc-mirror.rhel8.18 -c config.yaml docker://ci-op-n2k1twzy-c1a88-bastion-mirror-registry-xxxxxxxx-zhouy.apps.yinzhou-1031.qe.devcluster.openshift.com/ci-op-n2k1twzy/release --dest-tls-verify=false --v2 --workspace file://out1  --authfile auth.json

       

      Actual results:

      2. hit error :
      
       ✗   188/188 : (2s) registry.ci.openshift.org/ocp/release@sha256:e87cdacdf5c575ff99d4cca7ec38758512a408ac1653fef8dd7b2c4b85e295f4 
      2024/10/31 06:20:03  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
      2024/10/31 06:20:03  [ERROR]  : invalid destination name docker://ci-op-n2k1twzy-c1a88-bastion-mirror-registry-xxxxxxxx-zhouy.apps.yinzhou-1031.qe.devcluster.openshift.com/ci-op-n2k1twzy/release/openshift/release-images:: invalid reference format

      Expected results:

      3. no error

      Additional info:

      compared with 4.17 oc-mirror, no such issue :   ./oc-mirror -c config.yaml docker://ci-op-n2k1twzy-c1a88-bastion-mirror-registry-xxxxxxxx-zhouy.apps.yinzhou-1031.qe.devcluster.openshift.com/ci-op-n2k1twzy/release --dest-tls-verify=false --v2 --workspace file://out1  --authfile auth.json 2024/10/31 06:23:04  [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/10/31 06:23:04  [INFO]   : 👋 Hello, welcome to oc-mirror
      ...
       ✓   188/188 : (1s) registry.ci.openshift.org/ocp/release@sha256:e87cdacdf5c575ff99d4cca7ec38758512a408ac1653fef8dd7b2c4b85e295f4 
      2024/10/31 06:27:58  [INFO]   : === Results ===
      2024/10/31 06:27:58  [INFO]   : ✅ 188 / 188 release images mirrored successfully
      2024/10/31 06:27:58  [INFO]   : 📄 Generating IDMS file...
      2024/10/31 06:27:58  [INFO]   : out1/working-dir/cluster-resources/idms-oc-mirror.yaml file created
      2024/10/31 06:27:58  [INFO]   : 📄 No images by tag were mirrored. Skipping ITMS generation.
      2024/10/31 06:27:58  [INFO]   : 📄 No catalogs mirrored. Skipping CatalogSource file generation.
      2024/10/31 06:27:58  [INFO]   : mirror time     : 4m54.452548695s
      2024/10/31 06:27:58  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
        

       

            [OCPBUGS-45249] Failed to mirror ocp payload when use digest not the tag

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Important: OpenShift Container Platform 4.18.1 bug fix and security update), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHSA-2024:6122

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Important: OpenShift Container Platform 4.18.1 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:6122

            Ying Zhou added a comment -
            cat config.yaml
            kind: ImageSetConfiguration
            apiVersion: mirror.openshift.io/v2alpha1
            mirror:
              platform:
                release: registry.ci.openshift.org/ocp/release@sha256:bd7ce67dbc0e8c0ccec045135347a6634b7826a66708d105a6f87cfce17818b6
            
            with latest code , do mirror2disk+disk2mirror and mirror2mirror , no issue .
            
            oc-mirror version
            W0109 07:23:02.414559  407617 mirror.go:102] ⚠️  oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2WARNING: 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.18.0-202501080108.p0.g2baad84.assembly.stream.el9-2baad84", GitCommit:"2baad841a0c871f2e8b0677a608ee77644d91977", GitTreeState:"clean", BuildDate:"2025-01-08T02:05:06Z", GoVersion:"go1.22.9 (Red Hat 1.22.9-2.el9_5) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"} 

            Ying Zhou added a comment - cat config.yaml kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v2alpha1 mirror:   platform:     release: registry.ci.openshift.org/ocp/release@sha256:bd7ce67dbc0e8c0ccec045135347a6634b7826a66708d105a6f87cfce17818b6 with latest code , do mirror2disk+disk2mirror and mirror2mirror , no issue . oc-mirror version W0109 07:23:02.414559  407617 mirror.go:102] ⚠️  oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2WARNING: 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.18.0-202501080108.p0.g2baad84.assembly.stream.el9-2baad84 ", GitCommit:" 2baad841a0c871f2e8b0677a608ee77644d91977 ", GitTreeState:" clean ", BuildDate:" 2025-01-08T02:05:06Z ", GoVersion:" go1.22.9 (Red Hat 1.22.9-2.el9_5) X:strictfipsruntime ", Compiler :" gc ", Platform:" linux/amd64"}

            Hi luzuccar@redhat.com,

            Bugs should not be moved to Verified without first providing a Release Note Type ("Bug Fix" or "Release Note Not Required") and for type "Bug Fix" the Release Note Text must also be provided. Please populate the necessary fields before moving the Bug to Verified.

            OpenShift Jira Bot added a comment - Hi luzuccar@redhat.com , Bugs should not be moved to Verified without first providing a Release Note Type ("Bug Fix" or "Release Note Not Required") and for type "Bug Fix" the Release Note Text must also be provided. Please populate the necessary fields before moving the Bug to Verified.

            Ying Zhou added a comment -

            Done the pre-merge test, no issue found:

            ./oc-mirror version
            W0106 07:12:44.000145  475178 mirror.go:102] ⚠️  oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2WARNING: 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:"v0.0.0-unknown-96fa7a8a", GitCommit:"96fa7a8a", GitTreeState:"clean", BuildDate:"2025-01-06T02:31:21Z", GoVersion:"go1.23.0", Compiler:"gc", Platform:"linux/amd64"}
            
            
            Done the mirror2disk+disk2mirror and mirror2mirror, no issue found.
             

            Ying Zhou added a comment - Done the pre-merge test, no issue found: ./oc-mirror version W0106 07:12:44.000145  475178 mirror.go:102] ⚠️  oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2WARNING: 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:" v0.0.0-unknown-96fa7a8a ", GitCommit:" 96fa7a8a ", GitTreeState:" clean ", BuildDate:" 2025-01-06T02:31:21Z ", GoVersion:" go1.23.0 ", Compiler :" gc ", Platform:" linux/amd64"} Done the mirror2disk+disk2mirror and mirror2mirror, no issue found.

            Ying Zhou added a comment -

            For the origin bug OCPBUGS-44033 , we need the two fixed pr, so we also need to cherry-pick these 2 prs back. 

            Ying Zhou added a comment - For the origin bug OCPBUGS-44033 , we need the two fixed pr, so we also need to cherry-pick these 2 prs back. 

            Ying Zhou added a comment -

            When I used the fixed pr, I always hit error :

            2024/12/23 09:06:25  [ERROR]  : invalid destination name docker://localhost:55000/openshift/release-images:: invalid reference format 

            this is the imagesetconfig I used:

            cat config-45249.yaml
            kind: ImageSetConfiguration
            apiVersion: mirror.openshift.io/v2alpha1
            mirror:
              platform:
                release: registry.ci.openshift.org/ocp/release@sha256:81cdb94649f90fa1a6ccfc8827c55dcf7cfb7e0a6c7f05891476e78d022591ec 
            
            ./oc-mirror -c config-45249.yaml file://m2d --v2
            
            ./oc-mirror version
            W1223 09:08:22.677924 1584949 mirror.go:102] ⚠️  oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2WARNING: 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:"v0.1.1-alpha.3-489-ge62cee1", GitCommit:"e62cee14", GitTreeState:"clean", BuildDate:"2024-12-23T08:28:10Z", GoVersion:"go1.23.0", Compiler:"gc", Platform:"linux/amd64"}
            
            git log
            commit e62cee14bf21971315397591315a1cd731a18df9 (HEAD -> cherry-pick-978-to-release-4.18, origin/cherry-pick-978-to-release-4.18)
            Author: Luigi Mario Zuccarelli <luzuccar@redhat.com>
            Date:   Wed Nov 27 07:51:30 2024 +0100    OCPBUGS-44033: Failed to mirror ocp payload using digest
            
            
            

            Ying Zhou added a comment - When I used the fixed pr, I always hit error : 2024/12/23 09:06:25  [ERROR]  : invalid destination name docker: //localhost:55000/openshift/release-images:: invalid reference format this is the imagesetconfig I used: cat config-45249.yaml kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v2alpha1 mirror:   platform:     release: registry.ci.openshift.org/ocp/release@sha256:81cdb94649f90fa1a6ccfc8827c55dcf7cfb7e0a6c7f05891476e78d022591ec ./oc-mirror -c config-45249.yaml file: //m2d --v2 ./oc-mirror version W1223 09:08:22.677924 1584949 mirror.go:102] ⚠️  oc-mirror v1 is deprecated (starting in 4.18 release) and will be removed in a future release - please migrate to oc-mirror --v2WARNING: 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:" v0.1.1-alpha.3-489-ge62cee1 ", GitCommit:" e62cee14 ", GitTreeState:" clean ", BuildDate:" 2024-12-23T08:28:10Z ", GoVersion:" go1.23.0 ", Compiler :" gc ", Platform:" linux/amd64"} git log commit e62cee14bf21971315397591315a1cd731a18df9 (HEAD -> cherry-pick-978-to-release-4.18, origin/cherry-pick-978-to-release-4.18) Author: Luigi Mario Zuccarelli <luzuccar@redhat.com> Date:   Wed Nov 27 07:51:30 2024 +0100    OCPBUGS-44033: Failed to mirror ocp payload using digest

            Ying Zhou added a comment -

            luzuccar@redhat.com :

            Sorry , I missed the checkpoint for disk2mirror,  when I do  mirror2disk+disk2mirror ,  I hit error :

            ./oc-mirror -c config-45249.yaml --from file://out-release --v2 docker://localhost:5000 --dest-tls-verify=false2024/12/03 03:20:15  [INFO]   : 👋 Hello, welcome to oc-mirror
            2024/12/03 03:20:15  [INFO]   : ⚙️  setting up the environment for you...
            2024/12/03 03:20:15  [INFO]   : 🔀 workflow mode: diskToMirror 
            2024/12/03 03:22:07  [INFO]   : 🕵️  going to discover the necessary images...
            2024/12/03 03:22:07  [INFO]   : 🔍 collecting release images...
            2024/12/03 03:22:07  [INFO]   : 👋 Goodbye, thank you for using oc-mirror
            2024/12/03 03:22:07  [ERROR]  : [ReleaseImageCollector] release image docker://registry.ci.openshift.org/ocp/release@sha256:a29a109f286c77aecb71906696830c2f48c9b6ba0df77b88a7fb5c4399f3334a doesn't have a tag 

            no such issue when do mirror2disk and mirror2mirror.  Please help take a look .  also could reproduce for main branch.   So so sorry for the miss. 

            Ying Zhou added a comment - luzuccar@redhat.com : Sorry , I missed the checkpoint for disk2mirror,  when I do  mirror2disk+disk2mirror ,  I hit error : ./oc-mirror -c config-45249.yaml --from file: //out-release --v2 docker://localhost:5000 --dest-tls-verify=false2024/12/03 03:20:15  [INFO]   : 👋 Hello, welcome to oc-mirror 2024/12/03 03:20:15  [INFO]   : ⚙️  setting up the environment for you... 2024/12/03 03:20:15  [INFO]   : 🔀 workflow mode: diskToMirror  2024/12/03 03:22:07  [INFO]   : 🕵️  going to discover the necessary images... 2024/12/03 03:22:07  [INFO]   : 🔍 collecting release images... 2024/12/03 03:22:07  [INFO]   : 👋 Goodbye, thank you for using oc-mirror 2024/12/03 03:22:07  [ERROR]  : [ReleaseImageCollector] release image docker: //registry.ci.openshift.org/ocp/release@sha256:a29a109f286c77aecb71906696830c2f48c9b6ba0df77b88a7fb5c4399f3334a doesn't have a tag no such issue when do mirror2disk and mirror2mirror.  Please help take a look .  also could reproduce for main branch.   So so sorry for the miss. 

              luzuccar@redhat.com Luigi Mario Zuccarelli
              yinzhou@redhat.com Ying Zhou
              Ying Zhou Ying Zhou
              Ying Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: