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

Bug 1818086

Summary: [RFE] MCD should be blocking + warning on MachineConfigs that are trying to mount files as directories
Product: OpenShift Container Platform Reporter: Micah Abbott <miabbott>
Component: Machine Config OperatorAssignee: Antonio Murdaca <amurdaca>
Status: CLOSED NOTABUG QA Contact: Michael Nguyen <mnguyen>
Severity: low Docs Contact:
Priority: low    
Version: 4.5CC: smilner, wking
Target Milestone: ---   
Target Release: 4.5.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-05-20 17:44:07 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 Micah Abbott 2020-03-27 16:07:28 UTC
In BZ#1746968 and BZ#1817769, there was a fluentd DaemonSet that was configured to mount in `/etc/hostname` to a pod, but was incorrectly trying to mount it as a directory.

We had discussions in Slack about how to prevent this and it was suggested that the MCO could be of help.

Things that would be nice to have:
  - MCO blocks any MachineConfig that tries to mount `/etc/hostname` as a directory
  - MCO warns when an MC tried to do the same
  - MCO gains ability to do this for any file that is trying to be mounted as a directory

In the case of the `fluentd` DS, I'm not even sure that the MCO could detect the misconfiguration.  However, putting these kinds of protections in place may prevent potential problems in the future.

Comment 2 Steve Milner 2020-05-20 17:44:07 UTC
Closing as this is an RFE and not a bug. This can be added in Jira for future enhancement.