Bug 2175135

Summary: Unable to set virtLauncher pod as root via HCO CR
Product: Container Native Virtualization (CNV) Reporter: Akriti Gupta <akrgupta>
Component: VirtualizationAssignee: lpivarc
Status: CLOSED DUPLICATE QA Contact: Kedar Bidarkar <kbidarka>
Severity: high Docs Contact:
Priority: high    
Version: 4.13.0CC: acardace
Target Milestone: ---Keywords: Regression
Target Release: 4.14.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-27 07:40:20 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 Akriti Gupta 2023-03-03 10:22:04 UTC
Description of problem: When setting "nonRoot:false" in HCO CR, it has no effect on virt-launcher pod, pod still run as nonRoot

in 4.13 NonRoot FG is still there but deprecated, so it's still supposed to work 

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


How reproducible:


Steps to Reproduce:
1. set "nonRoot:false" in HCO CR
2. create a vm and start(VM is running)
3. check virt-launcher pod

Actual results:
[akriti@fedora cnv-tests]$ oc get pod virt-launcher-rhel8-ktjjjgjrodifxwui-x6t7b -o yaml | grep -B 2 runAsUser
      runAsNonRoot: true
      runAsUser: 107

Expected results:
      runAsNonRoot: false
      runAsUser: 0

Additional info:

Comment 1 Kedar Bidarkar 2023-03-03 10:25:11 UTC
We see that the NonRoot FG is still there (although deprecated): 
https://github.com/kubevirt/kubevirt/blob/release-0.59/pkg/virt-config/feature-gates.go#L48

Comment 2 Kedar Bidarkar 2023-03-03 10:27:39 UTC
This would cause a problem, as there is no way to configure a Root virt-launcher Pod.

Comment 3 lpivarc 2023-06-27 07:40:20 UTC

*** This bug has been marked as a duplicate of bug 2216774 ***