Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1853735

Summary: Default hooks dir is wrong and the needed (/etc/containers/oci/hooks.d/) was removed
Product: OpenShift Container Platform Reporter: Zvonko Kosic <zkosic>
Component: NodeAssignee: Peter Hunt <pehunt>
Status: CLOSED ERRATA QA Contact: Weinan Liu <weinliu>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.5CC: akamra, aos-bugs, jhou, jokerman, mifiedle, mpatel, pehunt, rphillips, umohnani, wabouham
Target Milestone: ---   
Target Release: 4.6.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: 2020-10-27 16:12:04 UTC Type: ---
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: 1854200    

Description Zvonko Kosic 2020-07-03 17:49:01 UTC
The current crio.conf installed in 4.5 has the wrong hooks dir: 


# Path to OCI hooks directories for automatically executed hooks. If one of the
# directories does not exist, then CRI-O will automatically skip them.
hooks_dir = [
        "/usr/share/containers/oci/hooks.d",
]


It should be 

hooks_dir = [
     "/etc/containers/oci/hooks.d",
]

/usr/share/containers/oci/hooks.d was removed because (1) it is read only and (2) there are no default hooks enabled. 


MCO merged a new config system from FCOS "templates: Migrate to CoreOS config format". 

Looking at https://github.com/openshift/machine-config-operator/blob/master/templates/worker/01-worker-container-runtime/_base/files/crio.yaml there are no settings for the default hooks dir. 


These changes are breaking all NVIDIA GPU operator installations. OCP 4.5 is not usable with GPUs.

Comment 1 Zvonko Kosic 2020-07-03 17:52:42 UTC
https://github.com/openshift/machine-config-operator/pull/1299/files This added the default hook directories.

Comment 2 Zvonko Kosic 2020-07-03 18:03:50 UTC
When I add the dir /etc/containers/oci/hooks.d/ to crio.conf the hooks are fired.

Comment 4 Peter Hunt 2020-07-06 13:23:47 UTC
attached PR should fix this

Comment 10 errata-xmlrpc 2020-10-27 16:12:04 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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196