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

Kubevirt and OSUS image skipped in collection phase

    • None
    • CLID Sprint 267
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, if `kubevirt` and `graphImage` images were not retrieved during the collection phase of `oc-mirror`, the run would succeed even if the images were missing. With this release, the `oc-mirror` run fails if the images are not found. (link:https://issues.redhat.com/browse/OCPBUGS-50981[*OCPBUGS-50981*])
      ------
      What: if there were failures getting kubevirt and graphImage images, they were being skipped.
      Consequence: the overall oc-mirror run would succeed but the images would be missing even though they were requested in the ImageSetConfiguration file.
      Fix: now oc-mirror run fails when the images are not found.
      Show
      * Previously, if `kubevirt` and `graphImage` images were not retrieved during the collection phase of `oc-mirror`, the run would succeed even if the images were missing. With this release, the `oc-mirror` run fails if the images are not found. (link: https://issues.redhat.com/browse/OCPBUGS-50981 [* OCPBUGS-50981 *]) ------ What: if there were failures getting kubevirt and graphImage images, they were being skipped. Consequence: the overall oc-mirror run would succeed but the images would be missing even though they were requested in the ImageSetConfiguration file. Fix: now oc-mirror run fails when the images are not found.
    • Bug Fix
    • In Progress

      This is a clone of issue OCPBUGS-49990. The following is the description of the original issue:
      โ€”
      Description of problem:

          During the collection, the KubeVirt image and the OSUS (graph image) are being skipped in case of failure to find them.

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

          

      How reproducible:

          

      Steps to Reproduce:

       Check the local_store_collector.go on the release package

      Actual results:

          Images are skipped

      Expected results:

          If the image was requested in the image set config, since these are release images, they should not be skipped, the workflow should fail

      Additional info:

          

            [OCPBUGS-50981] Kubevirt and OSUS image skipped in collection phase

            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.4 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-2025:2449

            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.4 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-2025:2449

            yinzhou@redhat.com could you please check it once and move it verified ?

            Nidan Gavali added a comment - yinzhou@redhat.com could you please check it once and move it verified ?

            Nidan Gavali added a comment - - edited

            Verified with the build below and can see the fix works as expected.

            [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror version
            W0306 14:28:24.201267   71087 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-202502261033.p0.g5263727.assembly.stream.el9-5263727", GitCommit:"5263727943b4a977c5ece6f529d88585ddd1e2d2", GitTreeState:"clean", BuildDate:"2025-02-26T11:10:29Z", GoVersion:"go1.22.9 (Red Hat 1.22.9-2.el9_5) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"} 

            Performed the below steps to verify:
            For OSUS:

            [fedora@preserve-nidan-fedora bug1081]$ cat isc.yaml 
            apiVersion: mirror.openshift.io/v2alpha1
            kind: ImageSetConfiguration
            mirror:
               platform:
                graph: true
                channels:
                - name: stable-4.16
                  minVersion: 4.16.0
                  maxVersion: 4.16.0
            ===================================================================================
            Perform m2d
            
            [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror -c isc.yaml file://testdoc --v2
            =================================================================================== [fedora@preserve-nidan-fedora bug1081]$ rm -rf testdoc/mirror_000001.tar
            [fedora@preserve-nidan-fedora bug1081]$ rm -rf ~/.oc-mirror/.cache/docker/registry/v2/repositories/openshift/graph-image/*
            ===================================================================================
            Perform d2m
            
            [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror -c isc.yaml --from file://testdoc --v2 docker://localhost:5000 --dest-tls-verify=false2025/03/06 14:21:14  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror
            2025/03/06 14:21:14  [INFO]   : โš™๏ธ  setting up the environment for you...
            2025/03/06 14:21:14  [INFO]   : ๐Ÿ”€ workflow mode: diskToMirror 
            2025/03/06 14:21:14  [INFO]   : ๐Ÿ•ต  going to discover the necessary images...
            2025/03/06 14:21:14  [INFO]   : ๐Ÿ” collecting release images...
            2025/03/06 14:21:14  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror
            2025/03/06 14:21:14  [ERROR]  : [ReleaseImageCollector]  error processing graph image in local cache: reading manifest latest in localhost:55000/openshift/graph-image: manifest unknown 
            
            

            For Kubevirt:

            [fedora@preserve-nidan-fedora bug1081]$ cat kubevirt.yaml 
            apiVersion: mirror.openshift.io/v2alpha1
            kind: ImageSetConfiguration
            mirror:
               platform:
                channels:
                - name: stable-4.12
                  minVersion: 4.12.61
                  maxVersion: 4.12.61
                kubeVirtContainer: true
            
            =======================================================================================
            [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror -c kubevirt.yaml file://testdoc --v22025/03/06 14:24:35  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror
            2025/03/06 14:24:35  [INFO]   : โš™๏ธ  setting up the environment for you...
            2025/03/06 14:24:35  [INFO]   : ๐Ÿ”€ workflow mode: mirrorToDisk 
            2025/03/06 14:24:35  [INFO]   : ๐Ÿ•ต  going to discover the necessary images...
            2025/03/06 14:24:35  [INFO]   : ๐Ÿ” collecting release images...
            2025/03/06 14:25:32  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror
            2025/03/06 14:25:32  [ERROR]  : [ReleaseImageCollector] could not find kubevirt image in this release 

             

             

            Nidan Gavali added a comment - - edited Verified with the build below and can see the fix works as expected. [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror version W0306 14:28:24.201267   71087 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-202502261033.p0.g5263727.assembly.stream.el9-5263727 ", GitCommit:" 5263727943b4a977c5ece6f529d88585ddd1e2d2 ", GitTreeState:" clean ", BuildDate:" 2025-02-26T11:10:29Z ", GoVersion:" go1.22.9 (Red Hat 1.22.9-2.el9_5) X:strictfipsruntime ", Compiler :" gc ", Platform:" linux/amd64"} Performed the below steps to verify: For OSUS: [fedora@preserve-nidan-fedora bug1081]$ cat isc.yaml  apiVersion: mirror.openshift.io/v2alpha1 kind: ImageSetConfiguration mirror:    platform:     graph: true     channels:     - name: stable-4.16       minVersion: 4.16.0       maxVersion: 4.16.0 =================================================================================== Perform m2d [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror -c isc.yaml file: //testdoc --v2 =================================================================================== [fedora@preserve-nidan-fedora bug1081]$ rm -rf testdoc/mirror_000001.tar [fedora@preserve-nidan-fedora bug1081]$ rm -rf ~/.oc-mirror/.cache/docker/registry/v2/repositories/openshift/graph-image/* =================================================================================== Perform d2m [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror -c isc.yaml --from file: //testdoc --v2 docker://localhost:5000 --dest-tls-verify=false2025/03/06 14:21:14  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror 2025/03/06 14:21:14  [INFO]   : โš™๏ธ  setting up the environment for you... 2025/03/06 14:21:14  [INFO]   : ๐Ÿ”€ workflow mode: diskToMirror  2025/03/06 14:21:14  [INFO]   : ๐Ÿ•ต  going to discover the necessary images... 2025/03/06 14:21:14  [INFO]   : ๐Ÿ” collecting release images... 2025/03/06 14:21:14  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror 2025/03/06 14:21:14  [ERROR]  : [ReleaseImageCollector]  error processing graph image in local cache: reading manifest latest in localhost:55000/openshift/graph-image: manifest unknown  For Kubevirt: [fedora@preserve-nidan-fedora bug1081]$ cat kubevirt.yaml  apiVersion: mirror.openshift.io/v2alpha1 kind: ImageSetConfiguration mirror:    platform:     channels:     - name: stable-4.12       minVersion: 4.12.61       maxVersion: 4.12.61     kubeVirtContainer: true ======================================================================================= [fedora@preserve-nidan-fedora bug1081]$ ./oc-mirror -c kubevirt.yaml file: //testdoc --v22025/03/06 14:24:35  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror 2025/03/06 14:24:35  [INFO]   : โš™๏ธ  setting up the environment for you... 2025/03/06 14:24:35  [INFO]   : ๐Ÿ”€ workflow mode: mirrorToDisk  2025/03/06 14:24:35  [INFO]   : ๐Ÿ•ต  going to discover the necessary images... 2025/03/06 14:24:35  [INFO]   : ๐Ÿ” collecting release images... 2025/03/06 14:25:32  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror 2025/03/06 14:25:32  [ERROR]  : [ReleaseImageCollector] could not find kubevirt image in this release     

            Ying Zhou added a comment -

            Will move to verified when accepted payload contain the fixed pr, for now we don't have this payload. 

            Ying Zhou added a comment - Will move to verified when accepted payload contain the fixed pr, for now we don't have this payload. 

            Ying Zhou added a comment -

            For the OSUS using following steps:

            1) with isc:
            apiVersion: mirror.openshift.io/v2alpha1
            kind: ImageSetConfiguration
            mirror:
               platform:
                graph: true
                channels:
                - name: stable-4.16
                  minVersion: 4.16.0
                  maxVersion: 4.16.0
            
            2) run m2d :
            ./bin/oc-mirror  -c /home/cloud-user/yinzhou/config-kubevirt.yaml  file://outtest --v2
            
            3) delete the tarball archive and local cache by : 
            `rm -rf outtest/mirror_000001.tar`
            `rm -rf ~/.oc-mirror/.cache/docker/registry/v2/repositories/openshift/graph-image/*`
            
            4) run the d2m command :
            ./bin/oc-mirror  -c /home/cloud-user/yinzhou/config-kubevirt.yaml  --from file://outtest --v2 docker://localhost:5000 --dest-tls-verify=false2025/02/26 04:48:06  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror
            2025/02/26 04:48:06  [INFO]   : โš™๏ธ  setting up the environment for you...
            2025/02/26 04:48:06  [INFO]   : ๐Ÿ”€ workflow mode: diskToMirror 
            2025/02/26 04:48:07  [INFO]   : ๐Ÿ•ต  going to discover the necessary images...
            2025/02/26 04:48:07  [INFO]   : ๐Ÿ” collecting release images...
            2025/02/26 04:48:07  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror
            2025/02/26 04:48:07  [ERROR]  : [ReleaseImageCollector]  error processing graph image in local cache: reading manifest latest in localhost:55000/openshift/graph-image: manifest unknown
            
            
            

            Ying Zhou added a comment - For the OSUS using following steps: 1) with isc: apiVersion: mirror.openshift.io/v2alpha1 kind: ImageSetConfiguration mirror:    platform:     graph: true     channels:     - name: stable-4.16       minVersion: 4.16.0       maxVersion: 4.16.0 2) run m2d : ./bin/oc-mirror  -c /home/cloud-user/yinzhou/config-kubevirt.yaml  file: //outtest --v2 3) delete the tarball archive and local cache by : `rm -rf outtest/mirror_000001.tar` `rm -rf ~/.oc-mirror/.cache/docker/registry/v2/repositories/openshift/graph-image/*` 4) run the d2m command : ./bin/oc-mirror  -c /home/cloud-user/yinzhou/config-kubevirt.yaml  --from file: //outtest --v2 docker://localhost:5000 --dest-tls-verify=false2025/02/26 04:48:06  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror 2025/02/26 04:48:06  [INFO]   : โš™๏ธ  setting up the environment for you... 2025/02/26 04:48:06  [INFO]   : ๐Ÿ”€ workflow mode: diskToMirror  2025/02/26 04:48:07  [INFO]   : ๐Ÿ•ต  going to discover the necessary images... 2025/02/26 04:48:07  [INFO]   : ๐Ÿ” collecting release images... 2025/02/26 04:48:07  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror 2025/02/26 04:48:07  [ERROR]  : [ReleaseImageCollector]  error processing graph image in local cache: reading manifest latest in localhost:55000/openshift/graph-image: manifest unknown

            Ying Zhou added a comment -

            build the oc-mirror with fixed pr, the code works as expected:

            ./bin/oc-mirror version 
            W0226 04:23:10.076621  240849 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-df202c27", GitCommit:"df202c27", GitTreeState:"clean", BuildDate:"2025-02-26T09:16:02Z", GoVersion:"go1.23.6", Compiler:"gc", Platform:"linux/amd64"}
            
            
            cat /home/cloud-user/yinzhou/config-kubevirt.yaml 
            apiVersion: mirror.openshift.io/v2alpha1
            kind: ImageSetConfiguration
            mirror:
               platform:
                channels:
                - name: stable-4.12
                  minVersion: 4.12.61
                  maxVersion: 4.12.61
                kubeVirtContainer: true
            
            
            ./bin/oc-mirror  -c /home/cloud-user/yinzhou/config-kubevirt.yaml file://outtest --v22025/02/26 04:20:21  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror
            2025/02/26 04:20:21  [INFO]   : โš™๏ธ  setting up the environment for you...
            2025/02/26 04:20:21  [INFO]   : ๐Ÿ”€ workflow mode: mirrorToDisk 
            2025/02/26 04:20:21  [INFO]   : ๐Ÿ•ต  going to discover the necessary images...
            2025/02/26 04:20:21  [INFO]   : ๐Ÿ” collecting release images...
            2025/02/26 04:21:14  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror
            2025/02/26 04:21:14  [ERROR]  : [ReleaseImageCollector] could not find kubevirt image in this release 
            [cloud-user@preserve-oc-mirror-vm oc-mirror]$ echo $?
            1
             

            Ying Zhou added a comment - build the oc-mirror with fixed pr, the code works as expected: ./bin/oc-mirror version  W0226 04:23:10.076621  240849 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-df202c27 ", GitCommit:" df202c27 ", GitTreeState:" clean ", BuildDate:" 2025-02-26T09:16:02Z ", GoVersion:" go1.23.6 ", Compiler :" gc ", Platform:" linux/amd64"} cat /home/cloud-user/yinzhou/config-kubevirt.yaml  apiVersion: mirror.openshift.io/v2alpha1 kind: ImageSetConfiguration mirror:    platform:     channels:     - name: stable-4.12       minVersion: 4.12.61       maxVersion: 4.12.61     kubeVirtContainer: true ./bin/oc-mirror  -c /home/cloud-user/yinzhou/config-kubevirt.yaml file: //outtest --v22025/02/26 04:20:21  [INFO]   : ๐Ÿ‘‹ Hello, welcome to oc-mirror 2025/02/26 04:20:21  [INFO]   : โš™๏ธ  setting up the environment for you... 2025/02/26 04:20:21  [INFO]   : ๐Ÿ”€ workflow mode: mirrorToDisk  2025/02/26 04:20:21  [INFO]   : ๐Ÿ•ต  going to discover the necessary images... 2025/02/26 04:20:21  [INFO]   : ๐Ÿ” collecting release images... 2025/02/26 04:21:14  [INFO]   : ๐Ÿ‘‹ Goodbye, thank you for using oc-mirror 2025/02/26 04:21:14  [ERROR]  : [ReleaseImageCollector] could not find kubevirt image in this release  [cloud-user@preserve-oc-mirror-vm oc-mirror]$ echo $? 1

              rdossant Rafael Fonseca dos Santos
              openshift-crt-jira-prow OpenShift Prow Bot
              Ying Zhou Ying Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: