Bug 1992231

Summary: hostpath-provisioner Pods are not created
Product: Container Native Virtualization (CNV) Reporter: Denis Ollier <dollierp>
Component: StorageAssignee: Alexander Wels <awels>
Status: CLOSED ERRATA QA Contact: Jenia Peimer <jpeimer>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.10.0CC: cnv-qe-bugs, mrashish, ngavrilo, yadu
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hostpath-provisioner-operator-v4.10.0-32, hco-v4.10.0-337 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-16 15:51:21 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:
Bug Depends On:    
Bug Blocks: 2008949    

Description Denis Ollier 2021-08-10 18:47:13 UTC
Description of problem
----------------------

After creating a HostPathProvisioner CustomResource, the DaemonSet is created by the hostpath-provisioner-operator but hostpath-provisioner Pods are not created.

Analysis
--------

The hostpath-provisioner Pod template has been modified in upstream PR https://github.com/kubevirt/hostpath-provisioner-operator/pull/113.

Among other changes, the Pod is now privileged.

> kind: DaemonSet
> apiVersion: apps/v1
> metadata:
>   name: hostpath-provisioner
>   namespace: openshift-cnv
> spec:
>   [...]
>   template:
>     [...]
>     spec:
>       containers:
>         - name: hostpath-provisioner
>           [...]
>           securityContext:
>             privileged: true
>           [...]

However the SCC has not been updated to allow such privileges

> kind: SecurityContextConstraints
> apiVersion: security.openshift.io/v1
> metadata:
>   name: hostpath-provisioner
> [...]
> allowPrivilegedContainer: false
> [...]
> users:
> - system:serviceaccount:openshift-cnv:hostpath-provisioner-admin
> [...]

Modifying the SCC to allow privileged containers (after scaling down the hostpath-provisioner-operator) fixes the issue.

Version
-------
OCP: 4.9.0-0.nightly
CNV: http://cnv-version-explorer.apps.cnv.engineering.redhat.com/BundleDetails?ver=v4.9.0-89

Comment 2 Yan Du 2021-08-16 09:36:39 UTC
The feature should be fully addressed in CNV 4.10, so change the version to 4.10
If the issue can not be reproduced on 4.10, feel free to close it.

Comment 3 Maya Rashish 2021-10-13 09:12:05 UTC
Verified as already fixed in 4.9.0-99 by Denis Ollier. This means it's in 4.9.0 already.

Comment 4 Maya Rashish 2021-10-13 09:15:32 UTC
Undoing previous, I didn't realize that cnv-4.9 went backwards and the breakage is now specific to 4.10 and should be fixed in 4.10.

Comment 5 Maya Rashish 2021-10-13 09:21:47 UTC
Fix for v4.10.0 should be from hostpath-provisioner-operator v4.10.0-4.

Comment 12 Maya Rashish 2021-11-14 09:50:30 UTC
*** Bug 1992244 has been marked as a duplicate of this bug. ***

Comment 19 errata-xmlrpc 2022-03-16 15:51:21 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