-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Capability to specify mount propagation mode of per volume with docker #20698
Conversation
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
@k8s-bot ok to test |
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
What is a user going to do with this flag? Mount prop. flags are INCREDIBLY complicated - what behavior do people need that this satisfies? |
Our team attempts to containerize flocker with zfs as back-end storage, and containers in the same flocker node need to read/write and share the same mounted volume. Without this flag, the volume mount propagation mode cannot be specified between the host and the container, and then the volume mount of each container would be isolated by namespace from each other. |
PR needs rebase |
@pmorie @swagiaal or whomever is looking at containerized kubelet now that mount.prop is available in Docker. Is the plan to enable shared by default? I don't like this as a facet of our API if we can avoid it. |
@thockin besides shared mode, Docker 1.10.0 also supports slave and private mode. |
I know what it supports, we've been watching it for a long time :) My point is that this is a REALLY complicated API feature that 0.001% of On Fri, Feb 5, 2016 at 8:34 AM, Kaffa notifications@github.com wrote:
|
@Kaffa-MY I agree with @thockin that we need to be careful about exposing an API surface for this. Currently the default is private in raw docker. @Kaffa-MY I'm curious about what your use-case for this is. |
Hmm.. I wonder what would be a good way to expose this if not through the API. Atomic Host has the same use case which is basically containerizing the mount tools so they don't have to be installed on the minimal host. Is there a way to make this available to volume plugins without putting it in the API ? That way the change can be made to the flocker plugin as I don't think there is a general use case of pod's needing to propagate mounts. |
cc/ me |
So here's one use-case I can imagine: say that we want to containerize mount operations and we want to run those containers in pods. |
Isn't that what Sami said? I thought the plan was to move all volumes to shared by default On Fri, Feb 5, 2016 at 3:09 PM, Paul Morie notifications@github.com wrote:
|
@kubernetes/rh-storage @kubernetes/rh-cluster-infra |
It is, @thockin, I hadn't seen sami's comment load in the browser window I had this in. |
@pmorie I'm containerizing flocker with zfs as backend storage, containers in the same pod, which constitute a whole flocker agent, need to share the same volume and the mount information. |
@Kaffa-MY @thockin The default propagation mode in docker is private. |
PR needs rebase |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
This would be VERY valuable to have in v1.4, given all the @kubernetes/sig-cluster-lifecycle work. |
+1. Would also really appreciate this feature. |
@Kaffa-MY Is the full PR including the implementation public? |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
+1 for @thockin's comments. Why can't hostpath volumes be mounted as shared by default? Assuming that not all containers will have the privilege to mount filesystems, are there drawbacks to mounting shared by default? @luxas Regarding "It would make it possible to run kubelet as a pod easily" Why is kubelet being run as a pod? I don't think this is an operating mode that @kubernetes/sig-node is willing to support. |
@vishh Check out self-hosting. It makes a lot of sense. See kubernetes-retired/kube-deploy#189 for ref. I guess the main drawback with default shared mounts is that it will be a docker-specific behaviour then. Otherwise, we could leave it as a docker-specific option that user that understand the implications (and the need for --privileged for it to work) could turn on. Perfect for storafe drivers for example. We might even be able to containerize the storage driver itself, and then kubelet just could pull and use a such Pod for mounting volumes (like we're using overlay network plugins in a daemonset today). cc @pmorie |
Yeah. I plan on using it for making a daemonset with cvmfs in it instead of flexvolumes. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
+1 to #20698 (comment) - this would make it possible to use Cloud SQL proxy's |
@andrewmchen not including implementation, this is just an api proposal |
PropagationShared PropagationMode = "shared" | ||
PropagationRShared PropagationMode = "rshared" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmorie is this emun ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think based on the discussion here, the next step is to figure out the answer to the following two questions:
- Can this be solved by a single sane default for volume mounts?
- If not 1, what's the minimal feature we need to expose to users to enable people the most, and what's a thinner API for it.
It's possible that this is the correct minimal thing to expose, but based on the discussion here, it needs to justify itself (and I personally think it is not).
Based on @thockin's comment and concerns (which I share), I think the next step here is to write a proposal explaining what the options are, what the use cases are, and explaining exactly why a given option is the right one.
I think iterating on a .md proposal will be more productive than iterating on the exact code / api-changes.
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message will repeat several times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. |
This PR hasn't been active in 30 days. It will be closed in 59 days (Nov 27, 2016). cc @Kaffa-MY @thockin You can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days |
Volume mount propagation mode has been supported since docker 1.10.0, but this function is absent in current kubelet.
This patch set allows one to specify mount propagation setting of a volume. Allowed values are "shared" or "slave" or "private", via introducing a new filed called
"Propagation"
in typeVolumeMount
inapi/types
This change is