Skip to content

Commit 37f3429

Browse files
committed
spec: Clarify target_path and staging_target_path
This patch clarifies the `target_path` and `staging_target_path` in the spec. It is CO's responsibility to make sure `target_path` and `staging_target_path` exist and is accessible. The SP should not use symbolic link to publish/stage the volume. For block volumes, the CO will create empty files at target paths. For mount volumes, the CO will create empty directories at target paths.
1 parent 7061dc2 commit 37f3429

File tree

3 files changed

+123
-93
lines changed

3 files changed

+123
-93
lines changed

csi.proto

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -944,10 +944,16 @@ message NodeStageVolumeRequest {
944944
// this capability. This is an OPTIONAL field.
945945
map<string, string> publish_info = 2;
946946

947-
// The path to which the volume will be published. It MUST be an
947+
// The path to which the volume will be staged. It MUST be an
948948
// absolute path in the root filesystem of the process serving this
949949
// request. The CO SHALL ensure that there is only one
950-
// staging_target_path per volume.
950+
// `staging_target_path` per volume. The SP MUST NOT use symbolic link
951+
// to staged the volume. The CO SHALL ensure that the path exists, and
952+
// that the process serving the request has `read` and `write`
953+
// permission to the path. If the path does not exist, the CO SHALL
954+
// create an empty file if the volume is being staged as a Block
955+
// Volume, and an empty directory if the volume is being staged as a
956+
// Mount Volume.
951957
// This is a REQUIRED field.
952958
string staging_target_path = 3;
953959

@@ -960,7 +966,7 @@ message NodeStageVolumeRequest {
960966
// section on how to use this field.
961967
map<string, string> node_stage_secrets = 5;
962968

963-
// Attributes of the volume to publish. This field is OPTIONAL and
969+
// Attributes of the volume to stage. This field is OPTIONAL and
964970
// MUST match the attributes of the `Volume` identified by
965971
// `volume_id`.
966972
map<string, string> volume_attributes = 6;
@@ -973,7 +979,7 @@ message NodeUnstageVolumeRequest {
973979
// The ID of the volume. This field is REQUIRED.
974980
string volume_id = 1;
975981

976-
// The path at which the volume was published. It MUST be an absolute
982+
// The path at which the volume was staged. It MUST be an absolute
977983
// path in the root filesystem of the process serving this request.
978984
// This is a REQUIRED field.
979985
string staging_target_path = 2;
@@ -993,7 +999,7 @@ message NodePublishVolumeRequest {
993999
// this capability. This is an OPTIONAL field.
9941000
map<string, string> publish_info = 2;
9951001

996-
// The path to which the device was mounted by `NodeStageVolume`.
1002+
// The path to which the volume was staged by `NodeStageVolume`.
9971003
// It MUST be an absolute path in the root filesystem of the process
9981004
// serving this request.
9991005
// It MUST be set if the Node Plugin implements the
@@ -1004,8 +1010,12 @@ message NodePublishVolumeRequest {
10041010
// The path to which the volume will be published. It MUST be an
10051011
// absolute path in the root filesystem of the process serving this
10061012
// request. The CO SHALL ensure uniqueness of target_path per volume.
1007-
// The CO SHALL ensure that the path exists, and that the process
1008-
// serving the request has `read` and `write` permissions to the path.
1013+
// The SP MUST NOT use symbolic link to publish the volume. The CO
1014+
// SHALL ensure that the path exists, and that the process serving the
1015+
// request has `read` and `write` permissions to the path. If the path
1016+
// does not exist, the CO SHALL create an empty file if the volume is
1017+
// being published as a Block Volume, and an empty directory if the
1018+
// volume is being published as a Mount Volume.
10091019
// This is a REQUIRED field.
10101020
string target_path = 4;
10111021

0 commit comments

Comments
 (0)