Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-node-exporter] Parameterise host root FS mount propagation #1583

Merged
merged 5 commits into from
Feb 10, 2022

Conversation

weibeld
Copy link
Contributor

@weibeld weibeld commented Dec 9, 2021

Signed-off-by: Daniel Weibel [email protected]

What this PR does / why we need it:

The mounting of the node's root (/) file system was enabled by default in PR #80 and it was made optional in PR #757. However, in the state of PR #757, the mount propagation is still hardcoded to HostToContainer. However, this feature requires certain settings in the container runtime to work properly (see here). Without these settings, the container may fail to start up with an error of the following form:

Error: failed to start container "node-exporter": Error response from daemon: path / is mounted on / but it is not a shared or slave mount

This PR allows to freely define the mount propagation type in the values file:

hostRootFsMount:
  enabled: true
  mountPropagation: HostToContainer

In this way, it's possible to disable mount propagation when mounting the host root file system (by setting the field to None or omitting it), which allows to mount the host root file system on nodes that don't support mount propagation.

The default mount propagation value is set to HostToContainer to maintain backward compatibility with older versions of the chart.

Which issue this PR fixes

Various reports of the default mount propagation type causing the container to crash at startup can be found in #467.

Special notes for your reviewer:

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale label Jan 8, 2022
@stale stale bot removed the lifecycle/stale label Jan 10, 2022
monotek
monotek previously approved these changes Jan 10, 2022
@stale
Copy link

stale bot commented Feb 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

@stale stale bot added the lifecycle/stale label Feb 9, 2022
Signed-off-by: André Bauer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants