Bug 2063324

Summary: MCO template output directories created with wrong mode causing render failure in unprivileged container environments
Product: OpenShift Container Platform Reporter: Dan Mace <dmace>
Component: Machine Config OperatorAssignee: Yu Qi Zhang <jerzhang>
Machine Config Operator sub component: Machine Config Operator QA Contact: Rio Liu <rioliu>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs, kgarriso, mkrejci
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.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: 2022-08-10 10:54:04 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: 2063326    

Description Dan Mace 2022-03-11 19:30:29 UTC
Description of problem:

While integrating with HyperShift which executes MCO binaries in unprivileged containers, I discovered the MCO template execution is creating a parent output directory with mode 0655, which causes rendering to fail because subdirectories and files can't be created within that parent due to the missing executable bit for the owner.

Version-Release number of MCO (Machine Config Operator) (if applicable): 4.11

Platform (AWS, VSphere, Metal, etc.): All

Are you certain that the root cause of the issue being reported is the MCO (Machine Config Operator)?
(Y/N/Not sure): Yes

Steps to Reproduce:

Run `machine-config-operator bootstrap ... --dest-dir=/output`.

Actual results:

Resulting destination directory has mode `drw-r-xr-x`.

Expected results:

Destination directory should have mode `drwxr-xr-x`.

Comment 4 Dan Mace 2022-03-15 12:49:21 UTC
I can verify that the merged fix resolves the issues we were having in HyperShift.

Comment 5 Dan Mace 2022-03-15 12:49:47 UTC
To be clear, I DID verify that the merged fix resolves the issues we were having in HyperShift.

Comment 8 errata-xmlrpc 2022-08-10 10:54: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 (Important: OpenShift Container Platform 4.11.0 bug fix and security 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:5069