-
Notifications
You must be signed in to change notification settings - Fork 378
spec: NodePublishVolume and target_path #80
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
Good catch. I believe the intent behind making this field required and specified by the CO was to make the call more idempotent--in other words, when a second call comes in, if the target path is the same as the last call, then the plug-in knows for sure that it's just a repeated call and not a request to do a second thing. That's potentially a real use case for volume mounts, where we might maybe want to mount the same volume to two different paths. For block devices, I am not sure. I think we imagined that iaas attachments would occur during |
Hi @julian-hj, As I understand it the proposed workflow would be for plug-ins to mount devices in a "private" area and bind-mount them to the supplied The question then becomes is there a way to present a raw block device to a consumer multiple times -- in other words, can a raw block device participate in the idempotent nature of this call? The answer is, at least for me, "I don't know." I'll say you have to assume that more than one I think you also have to assume that Does any of this answer the question? No, I don't think so. I think all it does is propose that a block device should be capable of being presented to multiple consumers. I think that would happen by simply providing the same device path each time. I do not think you can present an "alias" for the device to each container as you do via bind mounts and FS-based storage. In the end I think that Then again, perhaps I'm missing a way to easily present a raw, block device multiple times via some sort of alias system. |
I am not sure if it is relevant or not, but my understanding is a bit different--I was under the impression that the plugin should mount the volume directly to But again, I am not sure that's relevant to this discussion. Seems like we lack practical experience with iscsi and its ilk. Would the folks who wrote the scaleio bits for libstorage have any more insight? (assuming that wasn't you...) |
Hi @julian-hj, RE: libStorage - That was me :) Or rather I'm the lead engineer for libStorage and REX-Ray. I didn't write the ScaleIO driver directly, but I'm familiar enough with it to answer any questions you might have. I also thought the plug-in was to mount directly to the |
Hi @julian-hj, I think #17 is the issue to which @clintkitson has pointed me in the past. My understanding is then that a plug-in is responsible for mounting a device once in a private area and then bind mounting it to the target path with the requested permissions (ex. ro,rw). |
Hi @julian-hj, What I think all this shows us, if anything, is the importance of settling these discussions at a much more rapid clip. Issue #17 has been lingering since May 25th. @jieyu / @saad-ali, can we make sure to address issues #17 and #80 in the next CSI meeting? The potential workflow changes as a result of #17 need to be settled ASAP in order to establish a baseline for both discussions and implementations. Because sans #17 I would create a NodePlugin that simply mounts a device to the specified |
I would like to see the same, re: clarification re: #17. I'm already wondering what to do here for a plugin, when it comes to mounting and bind-mounting. clarification on that, and how to handle 'rw' vs 'ro' permissions would be useful. If there is a private place that volumes are mounted before being bind-mounted to the Just an example of the implications. |
Hmm, yeah, I am not sure that the proposed mount-then-bind-mount flow is even practical--or at any rate, if we go that way, then we will end up with a plugin that mounts a thing and bind mounts it to a place, and then the CO will proceed to bind mount it again to get it into the container and possibly also to make it read only. From my understanding, the open container runtime has that final bind mount fairly well baked into it, and the ultimate binding happens way down in the bowels of aufs (for linux) so just factoring it out and sticking it in the plugin is probably not gonna happen anytime soon. |
I wanted to leave another note here re: In order to mount to If that approach is taken, I think it's fine that Thoughts? This is something I could really use clarification on. For anyone who wants to see how I approached the bind-mount logic, feel free to take a look at some early code. Note that |
This sounds like its at a point that a decision needs to be made to properly get block volume support in CSI. Thoughts @saad-ali @julian-hj @jdef @jieyu? |
Hi All, I was ready to mention "Didn't I raise this topic?" when I realized it was this topic :) Yes, this is still an important issue. The provided |
I am going to add this to the list of stuff to discuss in the next CSI WG meeting. I will be on a plane during that meeting, so I will miss it, but I am hoping that folks will come to a good solution. For my part, I am thinking that perhaps given the various complications we face in expecting the CO to create the mount point, it would not be better to give up on that and come up with some alternate strategy to make sure that the |
This can be a bind mount too? Just that Symlink won't be meaningful if SP is in its own mount namespace and the root filesystem is different than that of the CO. |
@jieyu You are right, you can. I did not know this. When I first tried it out, I was thrown that fs type is shown as # touch /mnt/loop0
# ls -al /dev/disk/csi-blockdevices/loop0
lrwxrwxrwx. 1 root root 10 Jul 25 10:02 /dev/disk/csi-blockdevices/loop0 -> /dev/loop0
# mount -o bind /dev/disk/csi-blockdevices/loop0 /mnt/loop0
# mount | grep loop
devtmpfs on /mnt/loop0 type devtmpfs (rw,nosuid,seclabel,size=241476k,nr_inodes=60369,mode=755)
# ls -al /mnt/loop0
brw-rw----. 1 root disk 7, 0 Jul 25 10:46 /mnt/loop0
# mount /mnt/loop0 /mnt/test
# mount | grep loop
devtmpfs on /mnt/loop0 type devtmpfs (rw,nosuid,seclabel,size=241476k,nr_inodes=60369,mode=755)
/mnt/loop0 on /mnt/test type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
# ls -al /mnt/test
total 0
drwxr-xr-x. 2 root root 20 Jul 27 14:59 .
drwxr-xr-x. 4 root root 44 Jul 27 15:00 ..
-rw-r--r--. 1 root root 0 Jul 27 14:59 travis Note that I had previously formatted Thanks for pointing that out. I can go ahead and run with this info for now, and just have the plugin ensure that |
@saad-ali yes. I will create a PR today to clarify that it's CO's job to create the mount point (file or directory depending on it's block or mount volume) |
I have a question with regards to
NodePublishVolume
. Its request message,NodePublishVolumeRequest
, includes the fieldtarget_path
:This is marked as a REQUIRED field. However, the CSI specification seems to allow for the possibility of a Node Plug-in presenting block devices directly to a container. For example, in a
NodePublishVolumeRequest
thevolume_capability
field can contain aBlockDevice
message, indicating that the type of volume being published is a raw, block device.Given that the CO will likely NOT know the filesystem device path to the block device ahead of time and thus be unable to populate, ex.
/dev/sda
, in thetarget_path
field for theNodePublishVolumeRequest
, shouldn't thetarget_path
field be marked REQUIRED IFF thevolume_capability
field is aMountVolume
message?For example, here is a proposed revision:
The text was updated successfully, but these errors were encountered: