Bug 2001984 - VM not in running state with nonroot VirtLauncher Pods with volumeMode as Filesystem and using a PVC
Summary: VM not in running state with nonroot VirtLauncher Pods with volumeMode as Fil...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 4.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: lpivarc
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-07 15:33 UTC by Kedar Bidarkar
Modified: 2022-03-16 15:55 UTC (History)
4 users (show)

Fixed In Version: virt-operator-container-v4.10.0-142 hco-bundle-registry-container-v4.10.0-479
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-16 15:55:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 6240 0 None Merged Move host-disk to handler 2021-12-15 13:28:35 UTC
Github kubevirt kubevirt pull 6357 0 None None None 2021-09-08 13:24:14 UTC
Red Hat Product Errata RHSA-2022:0947 0 None None None 2022-03-16 15:55:58 UTC

Description Kedar Bidarkar 2021-09-07 15:33:12 UTC
Description of problem:
VM not in running state with nonroot VirtLauncher Pods with volumeMode as Filesystem and using a PVC.

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

How reproducible:
Always

Steps to Reproduce:
1. With nonroot VirtLauncher Pods set in FeatureGates
2. with volumeMode as Filesystem ( ocs-cephfs or NFS or HPP )
3. and using the PVC in the vm spec.

Actual results:
As seen below in additional details:

a) preparing host-disks failed: chown /var/run/kubevirt-private/vmi-disks/disk1/disk.img: operation not permitted"
b) VMI is stuck in Scheduled state

Expected results:

VMI should be in Running state.
And we should be able to successfully login to the VMI.


Additional info:

Events:
  Type     Reason            Age                 From                       Message
  ----     ------            ----                ----                       -------
  Normal   SuccessfulCreate  119s                virtualmachine-controller  Created virtual machine pod virt-launcher-vm-rhel84-virtiofs-ocsfs2-9hpmz
  Warning  SyncFailed        15s (x15 over 98s)  virt-handler               server error. command SyncVMI failed: "preparing host-disks failed: chown /var/run/kubevirt-private/vmi-disks/disk1/disk.img: operation not permitted"

[kbidarka@localhost virtiofs]$ oc get vmi 
NAME                        AGE    PHASE       IP             NODENAME                           READY
vm-fedora                   27m    Running     xx.yy.zz.aa   node13.redhat.com   True
vm-rhel84-virtiofs-ocsfs2   2m8s   Scheduled                  node14.redhat.com   False

[kbidarka@localhost virtiofs]$ oc get pods
NAME                                            READY   STATUS    RESTARTS   AGE
virt-launcher-vm-fedora-r6svj                   2/2     Running   0          27m
virt-launcher-vm-rhel84-virtiofs-ocsfs2-9hpmz   1/1     Running   0          2m27s

[kbidarka@localhost virtiofs]$ oc rsh virt-launcher-vm-rhel84-virtiofs-ocsfs2-9hpmz
sh-4.4$ cd /var/run/kubevirt-private/vmi-disks/
sh-4.4$ ls
disk1
sh-4.4$ cd disk1
sh-4.4$ ls -l 
total 29726720
-rw-rw----. 1 root root 30440161280 Sep  7 13:22 disk.img
sh-4.4$ id
uid=107(qemu) gid=107(qemu) groups=107(qemu),36(kvm)

Comment 1 Jed Lejosne 2021-09-07 19:18:36 UTC
@lpivarc could you please have a look at this?

Comment 2 lpivarc 2021-09-13 13:58:56 UTC
https://github.com/kubevirt/kubevirt/pull/6357 has been merged

Comment 4 Kedar Bidarkar 2021-12-05 15:47:24 UTC
]$ oc get kubevirt kubevirt-kubevirt-hyperconverged -n openshift-cnv -o yaml | grep -i NonRootExperimental
      - NonRootExperimental

 

(cnv-tests) [kbidarka@localhost ocs]$ virtctl console vm-rhel84-nfs
Successfully connected to vm-rhel84-nfs console. The escape sequence is ^]

Red Hat Enterprise Linux 8.4 (Ootpa)
Kernel 4.18.0-305.29.1.el8_4.x86_64 on an x86_64

Activate the web console with: systemctl enable --now cockpit.socket

vm-rhel84-nfs login: cloud-user
Password: 
Last login: Sun Dec  5 10:28:19 on ttyS0
[cloud-user@vm-rhel84-nfs ~]$ (cnv-tests) [kbidarka@localhost ocs]$ 

 

(cnv-tests) [kbidarka@localhost ocs]$ virtctl console vm-rhel84-ocs
Successfully connected to vm-rhel84-ocs console. The escape sequence is ^]

Red Hat Enterprise Linux 8.4 (Ootpa)
Kernel 4.18.0-305.29.1.el8_4.x86_64 on an x86_64

Activate the web console with: systemctl enable --now cockpit.socket

vm-rhel84-ocs login: cloud-user
Password: 
Last login: Sun Dec  5 10:28:46 on ttyS0
[cloud-user@vm-rhel84-ocs ~]$ 
[cloud-user@vm-rhel84-ocs ~]$ (cnv-tests) [kbidarka@localhost ocs]$ 



VERIFIED With container-native-virtualization/virt-operator/images/v4.10.0-123

Comment 5 Kedar Bidarkar 2021-12-20 11:07:39 UTC

VERIFIED With container-native-virtualization/virt-operator/images/v4.10.0-123

Comment 10 errata-xmlrpc 2022-03-16 15:55:26 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 (Moderate: OpenShift Virtualization 4.10.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:0947


Note You need to log in before you can comment on or make changes to this bug.