Skip to content

Commit 58316d1

Browse files
committed
Aligned spec.md error messages. Clarified some wording. Renamed to NodeStageVolume/NodeUnstageVolume. Addressed jdef comments. Added RPC interactions and reference counting section
NodeStageVolume modifications: added publish_volume_info to response. Changed credential naming. Added credentials to unstage.
1 parent 5fc87ca commit 58316d1

File tree

3 files changed

+1099
-566
lines changed

3 files changed

+1099
-566
lines changed

csi.proto

+75-47
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ service Controller {
4444
}
4545

4646
service Node {
47-
rpc NodePublishDevice (NodePublishDeviceRequest)
48-
returns (NodePublishDeviceResponse) {}
47+
rpc NodeStageVolume (NodeStageVolumeRequest)
48+
returns (NodeStageVolumeResponse) {}
4949

50-
rpc NodeUnpublishDevice (NodeUnpublishDeviceRequest)
51-
returns (NodeUnpublishDeviceResponse) {}
50+
rpc NodeUnstageVolume (NodeUnstageVolumeRequest)
51+
returns (NodeUnstageVolumeResponse) {}
5252

5353
rpc NodePublishVolume (NodePublishVolumeRequest)
5454
returns (NodePublishVolumeResponse) {}
@@ -188,18 +188,18 @@ message CreateVolumeRequest {
188188
// validating these parameters. COs will treat these as opaque.
189189
map<string, string> parameters = 5;
190190

191-
// End user credentials used to authenticate/authorize volume creation
192-
// request.
191+
// Credentials used by Controller plugin to authenticate/authorize
192+
// volume creation request.
193193
// This field contains credential data, for example username and
194194
// password. Each key must consist of alphanumeric characters, '-',
195195
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
196196
// choose to accept binary (non-string) data by using a binary-to-text
197197
// encoding scheme, like base64. An SP SHALL advertise the
198198
// requirements for credentials in documentation. COs SHALL permit
199-
// users to pass through the required credentials. This information is
199+
// passing through the required credentials. This information is
200200
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
201201
// This field is OPTIONAL.
202-
map<string, string> user_credentials = 6;
202+
map<string, string> controller_create_credentials = 6;
203203
}
204204

205205
message CreateVolumeResponse {
@@ -318,18 +318,18 @@ message DeleteVolumeRequest {
318318
// This field is REQUIRED.
319319
string volume_id = 2;
320320

321-
// End user credentials used to authenticate/authorize volume deletion
322-
// request.
321+
// Credentials used by Controller plugin to authenticate/authorize
322+
// volume deletion request.
323323
// This field contains credential data, for example username and
324324
// password. Each key must consist of alphanumeric characters, '-',
325325
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
326326
// choose to accept binary (non-string) data by using a binary-to-text
327327
// encoding scheme, like base64. An SP SHALL advertise the
328328
// requirements for credentials in documentation. COs SHALL permit
329-
// users to pass through the required credentials. This information is
329+
// passing through the required credentials. This information is
330330
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
331331
// This field is OPTIONAL.
332-
map<string, string> user_credentials = 3;
332+
map<string, string> controller_delete_credentials = 3;
333333
}
334334

335335
message DeleteVolumeResponse {}
@@ -355,18 +355,18 @@ message ControllerPublishVolumeRequest {
355355
// REQUIRED.
356356
bool readonly = 5;
357357

358-
// End user credentials used to authenticate/authorize controller
359-
// publish request.
358+
// Credentials used by Controller plugin to authenticate/authorize
359+
// controller publish request.
360360
// This field contains credential data, for example username and
361361
// password. Each key must consist of alphanumeric characters, '-',
362362
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
363363
// choose to accept binary (non-string) data by using a binary-to-text
364364
// encoding scheme, like base64. An SP SHALL advertise the
365365
// requirements for credentials in documentation. COs SHALL permit
366-
// users to pass through the required credentials. This information is
366+
// passing through the required credentials. This information is
367367
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
368368
// This field is OPTIONAL.
369-
map<string, string> user_credentials = 6;
369+
map<string, string> controller_publish_credentials = 6;
370370

371371
// Attributes of the volume to be used on a node. This field is
372372
// OPTIONAL and MUST match the attributes of the Volume identified
@@ -376,8 +376,8 @@ message ControllerPublishVolumeRequest {
376376

377377
message ControllerPublishVolumeResponse {
378378
// The SP specific information that will be passed to the Plugin in
379-
// the subsequent `NodePublishDevice` and `NodePublishVolume` calls
380-
// for the given volume.
379+
// the subsequent `NodeStageVolume` or `NodePublishVolume` calls
380+
// for the given volume.
381381
// This information is opaque to the CO. This field is OPTIONAL.
382382
map<string, string> publish_info = 1;
383383
}
@@ -397,18 +397,18 @@ message ControllerUnpublishVolumeRequest {
397397
// the volume from all nodes it is published to.
398398
string node_id = 3;
399399

400-
// End user credentials used to authenticate/authorize controller
401-
// unpublish request.
400+
// Credentials used by Controller plugin to authenticate/authorize
401+
// controller unpublish request.
402402
// This field contains credential data, for example username and
403403
// password. Each key must consist of alphanumeric characters, '-',
404404
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
405405
// choose to accept binary (non-string) data by using a binary-to-text
406406
// encoding scheme, like base64. An SP SHALL advertise the
407407
// requirements for credentials in documentation. COs SHALL permit
408-
// users to pass through the required credentials. This information is
408+
// passing through the required credentials. This information is
409409
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
410410
// This field is OPTIONAL.
411-
map<string, string> user_credentials = 4;
411+
map<string, string> controller_unpublish_credentials = 4;
412412
}
413413

414414
message ControllerUnpublishVolumeResponse {}
@@ -550,7 +550,7 @@ message ControllerServiceCapability {
550550
}
551551
////////
552552
////////
553-
message NodePublishDeviceRequest {
553+
message NodeStageVolumeRequest {
554554
// The API version assumed by the CO. This is a REQUIRED field.
555555
Version version = 1;
556556

@@ -562,24 +562,42 @@ message NodePublishDeviceRequest {
562562
// has `PUBLISH_UNPUBLISH_VOLUME` controller capability, and SHALL be
563563
// left unset if the corresponding Controller Plugin does not have
564564
// this capability. This is an OPTIONAL field.
565-
map<string, string> publish_volume_info = 3;
565+
map<string, string> publish_info = 3;
566566

567567
// The path to which the volume will be published. It MUST be an
568568
// absolute path in the root filesystem of the process serving this
569-
// request. The CO SHALL ensure uniqueness of global_target_path per
570-
// volume.
569+
// request. The CO SHALL ensure that there is only one
570+
// staging_target_path per volume.
571571
// This is a REQUIRED field.
572-
string global_target_path = 4;
572+
string staging_target_path = 4;
573573

574574
// The capability of the volume the CO expects the volume to have.
575575
// This is a REQUIRED field.
576576
VolumeCapability volume_capability = 5;
577+
578+
// Credentials used by Node plugin to authenticate/authorize node
579+
// stage request.
580+
// This field contains credential data, for example username and
581+
// password. Each key must consist of alphanumeric characters, '-',
582+
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
583+
// choose to accept binary (non-string) data by using a binary-to-text
584+
// encoding scheme, like base64. An SP SHALL advertise the
585+
// requirements for credentials in documentation. COs SHALL permit
586+
// passing through the required credentials. This information is
587+
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
588+
// This field is OPTIONAL.
589+
map<string, string> node_stage_credentials = 6;
590+
591+
// Attributes of the volume to publish. This field is OPTIONAL and
592+
// MUST match the attributes of the VolumeInfo identified by
593+
// `volume_id`.
594+
map<string,string> volume_attributes = 7;
577595
}
578596

579-
message NodePublishDeviceResponse {}
597+
message NodeStageVolumeResponse {}
580598
////////
581599
////////
582-
message NodeUnpublishDeviceRequest {
600+
message NodeUnstageVolumeRequest {
583601
// The API version assumed by the CO. This is a REQUIRED field.
584602
Version version = 1;
585603

@@ -589,10 +607,23 @@ message NodeUnpublishDeviceRequest {
589607
// The path at which the volume was published. It MUST be an absolute
590608
// path in the root filesystem of the process serving this request.
591609
// This is a REQUIRED field.
592-
string global_target_path = 3;
610+
string staging_target_path = 3;
611+
612+
// Credentials used by Node plugin to authenticate/authorize node
613+
// unstage request.
614+
// This field contains credential data, for example username and
615+
// password. Each key must consist of alphanumeric characters, '-',
616+
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
617+
// choose to accept binary (non-string) data by using a binary-to-text
618+
// encoding scheme, like base64. An SP SHALL advertise the
619+
// requirements for credentials in documentation. COs SHALL permit
620+
// passing through the required credentials. This information is
621+
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
622+
// This field is OPTIONAL.
623+
map<string, string> node_unstage_credentials = 4;
593624
}
594625

595-
message NodeUnpublishDeviceResponse {}
626+
message NodeUnstageVolumeResponse {}
596627
////////
597628
////////
598629
message NodePublishVolumeRequest {
@@ -609,11 +640,13 @@ message NodePublishVolumeRequest {
609640
// this capability. This is an OPTIONAL field.
610641
map<string, string> publish_info = 3;
611642

612-
// The path to which the device was mounted by `NodePublishDevice`.
643+
// The path to which the device was mounted by `NodeStageVolume`.
613644
// It MUST be an absolute path in the root filesystem of the process
614645
// serving this request.
646+
// It MUST be set if the Node Plugin implements the
647+
// `STAGE_UNSTAGE_VOLUME` node capability.
615648
// This is an OPTIONAL field.
616-
string global_target_path = 4;
649+
string staging_target_path = 4;
617650

618651
// The path to which the volume will be published. It MUST be an
619652
// absolute path in the root filesystem of the process serving this
@@ -631,18 +664,19 @@ message NodePublishVolumeRequest {
631664
// REQUIRED.
632665
bool readonly = 7;
633666

634-
// End user credentials used to authenticate/authorize node
667+
// Credentials used by Node plugin to authenticate/authorize node
635668
// publish request.
636669
// This field contains credential data, for example username and
637670
// password. Each key must consist of alphanumeric characters, '-',
638671
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
639672
// choose to accept binary (non-string) data by using a binary-to-text
640673
// encoding scheme, like base64. An SP SHALL advertise the
641674
// requirements for credentials in documentation. COs SHALL permit
642-
// users to pass through the required credentials. This information is
675+
// passing through the required credentials. This information is
643676
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
644677
// This field is OPTIONAL.
645-
map<string, string> user_credentials = 8;
678+
map<string, string> node_publish_credentials = 8;
679+
646680

647681
// Attributes of the volume to publish. This field is OPTIONAL and
648682
// MUST match the attributes of the Volume identified by
@@ -660,29 +694,23 @@ message NodeUnpublishVolumeRequest {
660694
// The ID of the volume. This field is REQUIRED.
661695
string volume_id = 2;
662696

663-
// The path to which the device was mounted by `NodePublishDevice`.
664-
// It MUST be an absolute path in the root filesystem of the process
665-
// serving this request.
666-
// This is an OPTIONAL field.
667-
string global_target_path = 3;
668-
669697
// The path at which the volume was published. It MUST be an absolute
670698
// path in the root filesystem of the process serving this request.
671699
// This is a REQUIRED field.
672-
string target_path = 4;
700+
string target_path = 3;
673701

674-
// End user credentials used to authenticate/authorize node
702+
// Credentials used by Node plugin to authenticate/authorize node
675703
// unpublish request.
676704
// This field contains credential data, for example username and
677705
// password. Each key must consist of alphanumeric characters, '-',
678706
// '_' or '.'. Each value MUST contain a valid string. An SP MAY
679707
// choose to accept binary (non-string) data by using a binary-to-text
680708
// encoding scheme, like base64. An SP SHALL advertise the
681709
// requirements for credentials in documentation. COs SHALL permit
682-
// users to pass through the required credentials. This information is
710+
// passing through the required credentials. This information is
683711
// sensitive and MUST be treated as such (not logged, etc.) by the CO.
684712
// This field is OPTIONAL.
685-
map<string, string> user_credentials = 5;
713+
map<string, string> node_unpublish_credentials = 4;
686714
}
687715

688716
message NodeUnpublishVolumeResponse {}
@@ -725,7 +753,7 @@ message NodeServiceCapability {
725753
message RPC {
726754
enum Type {
727755
UNKNOWN = 0;
728-
PUBLISH_UNPUBLISH_DEVICE = 1;
756+
STAGE_UNSTAGE_VOLUME = 1;
729757
}
730758

731759
Type type = 1;

0 commit comments

Comments
 (0)