Skip to content

Commit 9fd37a6

Browse files
committed
Make SP responsible for creation of target_path
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.
1 parent 5c0a546 commit 9fd37a6

File tree

3 files changed

+101
-89
lines changed

3 files changed

+101
-89
lines changed

csi.proto

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ message NodeStageVolumeRequest {
984984
// is only one `staging_target_path` per volume. The CO SHALL ensure
985985
// that the path is directory and that the process serving the
986986
// request has `read` and `write` permission to that directory. The
987-
// CO SHALL be responsible for creating the path if it does not
987+
// CO SHALL be responsible for creating the directory if it does not
988988
// exist.
989989
// This is a REQUIRED field.
990990
string staging_target_path = 3;
@@ -1044,11 +1044,14 @@ message NodePublishVolumeRequest {
10441044
// The path to which the volume will be published. It MUST be an
10451045
// absolute path in the root filesystem of the process serving this
10461046
// request. The CO SHALL ensure uniqueness of target_path per volume.
1047-
// The CO SHALL ensure that the path exists and that the process
1048-
// serving the request has `read` and `write` permissions to the path.
1049-
// For volumes with an access type of block, the path MUST be a file.
1050-
// For volumes with an access type of mount, the path MUST be a
1051-
// directory. The SP SHALL bind mount the volume to the target path.
1047+
// The CO SHALL ensure that the parent directory of this path exists
1048+
// and that the process serving the request has `read` and `write`
1049+
// permissions to that parent directory.
1050+
// For volumes with an access type of block, the SP SHALL place the
1051+
// block device at target_path.
1052+
// For volumes with an access type of mount, the SP SHALL place the
1053+
// mounted directory at target_path.
1054+
// Creation of target_path is the responsibility of the SP.
10521055
// This is a REQUIRED field.
10531056
string target_path = 4;
10541057

@@ -1082,6 +1085,7 @@ message NodeUnpublishVolumeRequest {
10821085

10831086
// The path at which the volume was published. It MUST be an absolute
10841087
// path in the root filesystem of the process serving this request.
1088+
// The SP MUST delete this path.
10851089
// This is a REQUIRED field.
10861090
string target_path = 2;
10871091
}

0 commit comments

Comments
 (0)