-
Notifications
You must be signed in to change notification settings - Fork 378
Support for mounting the same volume on the same node by multiple workloads #178
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
Comments
There are many valid and currently in-use use cases for consuming the same volume on multiple workloads on the same Node. The restriction outlined in the table above is an artificial one that is not an actual limitation of devices and therefore I agree that the spec should not force this limitation and leave it open for the SP to decide. This change would also align with the current interpretation of access modes in Kubernetes which users are successfully using in production today. |
xref #150. Please see the discussion there. I think the correct approach is to refine access mode so that we can explicitly distinguish plugins that only have single publish capability vs. those plugins that are single node but has multiple publish capability. |
So IIUC this is like multiple containers on a single node; I think clearing things up to allow that is a good idea. There is a caveat there for non-shared FS scenarios that I think will be an issue but that's more of a user problem I think; or perhaps up to the driver to decide if they want to disable this ability for non-shared FS cases (long winded version of LGTM :) ) |
In a Kubernetes scenario with RWM support, working around this restriction would require scheduling pods that share a volume on separate nodes. Why is this restriction needed? |
This is a special case that both kubelet and the volume driver should support, because users might expect it. One Kubernetes mechanism to deploy pods like this is via pod affinity. However, strictly speaking the CSI spec does not allow this usage mode (see container-storage-interface/spec#150) and there is an on-going debate to enable it (see container-storage-interface/spec#178). Therefore this test gets skipped unless explicitly enabled for a driver. CSI drivers which create a block device for a remote volume in NodePublishVolume fail this test. They have to make the volume available in NodeStageVolume and then in NodePublishVolume merely do a bind mount (as for example in https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/pkg/gce-pd-csi-driver/node.go#L150).
This is a special case that both kubelet and the volume driver should support, because users might expect it. One Kubernetes mechanism to deploy pods like this is via pod affinity. However, strictly speaking the CSI spec does not allow this usage mode (see container-storage-interface/spec#150) and there is an on-going debate to enable it (see container-storage-interface/spec#178). Therefore this test gets skipped unless explicitly enabled for a driver. CSI drivers which create a block device for a remote volume in NodePublishVolume fail this test. They have to make the volume available in NodeStageVolume and then in NodePublishVolume merely do a bind mount (as for example in https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/pkg/gce-pd-csi-driver/node.go#L150).
According to the spec's table below:
Plugin should fail on the second NodePublish request if a second workload tries to mount the same volume on the same node.
This is a valid use case for some containers orchestrators, the spec should not force this behaviour and it should be left for CO's plugin consideration.
The text was updated successfully, but these errors were encountered: