Skip to content

Commit

Permalink
Make SP responsible for creation of target_path
Browse files Browse the repository at this point in the history
In NodePublishVolume, SPs may want to return block devices by either
bind-mounting a device from /dev, or directly calling mknod at the
target path. To allow either approach, make it clear that the SP is
responsible for creation and cleanup for target_path.
  • Loading branch information
bswartz committed Nov 15, 2018
1 parent 5c0a546 commit 9fd37a6
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 89 deletions.
16 changes: 10 additions & 6 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ message NodeStageVolumeRequest {
// is only one `staging_target_path` per volume. The CO SHALL ensure
// that the path is directory and that the process serving the
// request has `read` and `write` permission to that directory. The
// CO SHALL be responsible for creating the path if it does not
// CO SHALL be responsible for creating the directory if it does not
// exist.
// This is a REQUIRED field.
string staging_target_path = 3;
Expand Down Expand Up @@ -1044,11 +1044,14 @@ message NodePublishVolumeRequest {
// The path to which the volume will be published. It MUST be an
// absolute path in the root filesystem of the process serving this
// request. The CO SHALL ensure uniqueness of target_path per volume.
// The CO SHALL ensure that the path exists and that the process
// serving the request has `read` and `write` permissions to the path.
// For volumes with an access type of block, the path MUST be a file.
// For volumes with an access type of mount, the path MUST be a
// directory. The SP SHALL bind mount the volume to the target path.
// The CO SHALL ensure that the parent directory of this path exists
// and that the process serving the request has `read` and `write`
// permissions to that parent directory.
// For volumes with an access type of block, the SP SHALL place the
// block device at target_path.
// For volumes with an access type of mount, the SP SHALL place the
// mounted directory at target_path.
// Creation of target_path is the responsibility of the SP.
// This is a REQUIRED field.
string target_path = 4;

Expand Down Expand Up @@ -1082,6 +1085,7 @@ message NodeUnpublishVolumeRequest {

// The path at which the volume was published. It MUST be an absolute
// path in the root filesystem of the process serving this request.
// The SP MUST delete this path.
// This is a REQUIRED field.
string target_path = 2;
}
Expand Down
Loading

0 comments on commit 9fd37a6

Please sign in to comment.