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

Set the requested PropagationMode for volumes #15817

Closed
wants to merge 1 commit into from

Conversation

ygersie
Copy link
Contributor

@ygersie ygersie commented Jan 18, 2023

We have disabled docker volumes in our Nomad clients to force users to have to use host volumes since these are better controlled using ACL's.

For running cadvisor we need to expose the docker data directory to cadvisor, we do this by allowing the cadvisor job to mount a host volume with the docker data path and set propagationmode to "host-to-task" (rslave) as docker requires this, see error:

failed to create container:
  API error (400):
    invalid mount config:
      must use either propagation mode "rslave" or "rshared" when mount source is within the daemon root

Currently this wasn't applied for Host nor CSI volume mounts and I don't know why. This MR enables the option for both.

We have disabled docker volumes in our Nomad clients to force users to have to
use host volumes since these are better controlled using ACL's.

For running cadvisor we need to expose the docker data directory to cadvisor, we
do this by allowing the cadvisor job to mount a host volume with the docker data
path and set propagationmode to "host-to-task" (rslave) as docker requires this,
see error:

```
failed to create container:
  API error (400):
    invalid mount config:
      must use either propagation mode "rslave" or "rshared" when mount source is within the daemon root
```

Currently this wasn't applied for Host nor CSI volume mounts and I don't know why.
This MR enables the option for both.
@tgross
Copy link
Member

tgross commented Jan 18, 2023

Hi @ygersie! We've got #15626 open already with this fix. I need to take one more pass over it (there was a docs update that landed after the PR was opened) and then that'll get merged. But thanks for opening this PR!

@tgross tgross closed this Jan 18, 2023
@ygersie ygersie deleted the mount_propagation branch January 18, 2023 14:38
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