Skip to content

Commit 6620cb6

Browse files
committed
Update the requirements for staging and target paths
The vague wording around the staging and target paths left open too many possible implementations for raw block volumes, and implementors ended up doing non-obvious things. This change clarifies the contract between the CO and the SP when staging and publishing raw block volumes on the node. Specifically we now require that the CO creates the staging_target_path and that it is always a directory. And we require that the SP create the target_path and it should be a device file for blocks and a mount point for filesystems.
1 parent 7673c23 commit 6620cb6

File tree

3 files changed

+116
-95
lines changed

3 files changed

+116
-95
lines changed

csi.proto

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -980,11 +980,12 @@ message NodeStageVolumeRequest {
980980

981981
// The path to which the volume MAY be staged. It MUST be an
982982
// absolute path in the root filesystem of the process serving this
983-
// request. The CO SHALL ensure that there is only one
984-
// `staging_target_path` per volume. The CO SHALL ensure that the
985-
// process serving the request has `read` and `write` permission to
986-
// the path, and is able to create files or directories at the path
987-
// if it does not exist.
983+
// request, and MUST be a directory. The CO SHALL ensure that there
984+
// is only one `staging_target_path` per volume. The CO SHALL ensure
985+
// that the path is directory and that the process serving the
986+
// request has `read` and `write` permission to that directory. The
987+
// CO SHALL be responsible for creating the directory if it does not
988+
// exist.
988989
// This is a REQUIRED field.
989990
string staging_target_path = 3;
990991

@@ -1043,9 +1044,14 @@ message NodePublishVolumeRequest {
10431044
// The path to which the volume will be published. It MUST be an
10441045
// absolute path in the root filesystem of the process serving this
10451046
// request. The CO SHALL ensure uniqueness of target_path per volume.
1046-
// The CO SHALL ensure that the process serving the request has
1047-
// `read` and `write` permissions to the path, and is able to create
1048-
// files or directories at the path if it does not exist.
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.
10491055
// This is a REQUIRED field.
10501056
string target_path = 4;
10511057

@@ -1079,6 +1085,7 @@ message NodeUnpublishVolumeRequest {
10791085

10801086
// The path at which the volume was published. It MUST be an absolute
10811087
// path in the root filesystem of the process serving this request.
1088+
// The SP MUST delete the file or directory it created at this path.
10821089
// This is a REQUIRED field.
10831090
string target_path = 2;
10841091
}

0 commit comments

Comments
 (0)