Bug 2078728

Summary: Common template rootDisk is not named correctly
Product: Container Native Virtualization (CNV) Reporter: Yaacov Zamir <yzamir>
Component: SSPAssignee: Yaacov Zamir <yzamir>
Status: CLOSED ERRATA QA Contact: Geetika Kapoor <gkapoor>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.10.0CC: cnv-qe-bugs, dholler, ycui
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubevirt-ssp-operator v4.11.0-47 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-14 19:31:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yaacov Zamir 2022-04-26 06:33:50 UTC
Description of problem:
Common template rootDisk is not named correctly, when creating a VM from common template the rootDisk is named by the VM name instead of rootDisk
this is a problem because:
a. the convention in common templates is to call the disk by it's use, e.g. "cloudinitdisk", "default" and not by the vm name
b. it is not matching the anotation "defaults.template.kubevirt.io/disk"
c. it is making harder on automation utilities to finding the rootdisk

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


How reproducible:

Steps to Reproduce:
1. create a virtual machine from a common template
2. look for a disk matching the name in defaults.template.kubevirt.io/disk anotation
3. look for a "rootDisk" disk 

Actual results:
no disk matching the annotation found (for use cases looking by annotation)
no "rootDisk" disk found (for use cases looking by disk usage)

Expected results:
a "rootDisk" is found the the "defaults.template.kubevirt.io/disk" annotation is  pointing at it

Additional info:

Comment 1 Geetika Kapoor 2022-06-30 17:27:13 UTC
Test Environment:
=================

$ oc get csv -n openshift-cnv
NAME                                       DISPLAY                                          VERSION                 REPLACES                                   PHASE
jaeger-operator.v1.30.1-0.1648511826.p     Red Hat OpenShift distributed tracing platform   1.30.1+0.1648511826.p                                              Succeeded
kiali-operator.v1.48.0                     Kiali Operator                                   1.48.0                  kiali-operator.v1.36.10                    Succeeded
kubevirt-hyperconverged-operator.v4.11.0   OpenShift Virtualization                         4.11.0                  kubevirt-hyperconverged-operator.v4.10.2   Succeeded
servicemeshoperator.v2.2.0                 Red Hat OpenShift Service Mesh                   2.2.0-0                 servicemeshoperator.v2.1.3                 Succeeded


 Common template has rootdisk for:

 1.  annotations:
    defaults.template.kubevirt.io/disk: rootdisk

 2.         devices:
            disks:
            - disk:
                bus: virtio
              name: rootdisk

 3.         volumes:
        - dataVolume:
            name: ${NAME}
          name: rootdisk

Rootdisk in VM provisioning/start/stopped mode

        devices:
          disks:
          - disk:
              bus: virtio
            name: rootdisk

      volumes:
      - dataVolume:
          name: mytest
        name: rootdisk

Comment 4 errata-xmlrpc 2022-09-14 19:31:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.11.0 Images security and bug fix 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-2022:6526