Bug 1818086 - [RFE] MCD should be blocking + warning on MachineConfigs that are trying to mount files as directories
Summary: [RFE] MCD should be blocking + warning on MachineConfigs that are trying to m...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.5.0
Assignee: Antonio Murdaca
QA Contact: Michael Nguyen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-27 16:07 UTC by Micah Abbott
Modified: 2020-05-20 17:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 17:44:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1746968 0 unspecified CLOSED rsyslog and fluentd write /etc/hostname at startup, causes systemd-hostnamed to not start 2023-03-24 15:21:06 UTC
Red Hat Bugzilla 1817769 0 medium CLOSED fluentd volume-mounting /etc/hostname before the file exists leads to directory creation and eventually: kubernetes.io/h... 2021-08-09 07:30:00 UTC
Red Hat Bugzilla 1817774 0 unspecified CLOSED Alert if any node has: kubernetes.io/hostname: localhost 2021-02-22 00:41:40 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.