@@ -95,6 +95,11 @@ service Controller {
95
95
96
96
rpc ControllerExpandVolume (ControllerExpandVolumeRequest )
97
97
returns (ControllerExpandVolumeResponse ) {}
98
+
99
+ rpc ControllerGetVolume (ControllerGetVolumeRequest )
100
+ returns (ControllerGetVolumeResponse ) {
101
+ option (alpha_method) = true ;
102
+ }
98
103
}
99
104
100
105
service Node {
@@ -849,6 +854,12 @@ message ListVolumesResponse {
849
854
// published_node_ids MAY include nodes not published to or
850
855
// reported by the SP. The CO MUST be resilient to that.
851
856
repeated string published_node_ids = 1 ;
857
+
858
+ // Information about the current condition of the volume.
859
+ // This field is OPTIONAL.
860
+ // This field MUST be specified if the
861
+ // VOLUME_CONDITION controller capability is supported.
862
+ VolumeCondition volume_condition = 2 [(alpha_field) = true ];
852
863
}
853
864
854
865
message Entry {
@@ -871,6 +882,40 @@ message ListVolumesResponse {
871
882
// An empty string is equal to an unspecified field value.
872
883
string next_token = 2 ;
873
884
}
885
+ message ControllerGetVolumeRequest {
886
+ option (alpha_message) = true ;
887
+
888
+ // The ID of the volume to fetch current volume information for.
889
+ // This field is REQUIRED.
890
+ string volume_id = 1 ;
891
+ }
892
+
893
+ message ControllerGetVolumeResponse {
894
+ option (alpha_message) = true ;
895
+
896
+ message VolumeStatus {
897
+ // A list of all the `node_id` of nodes that this volume is
898
+ // controller published on.
899
+ // This field is OPTIONAL.
900
+ // This field MUST be specified if the PUBLISH_UNPUBLISH_VOLUME
901
+ // controller capability is supported.
902
+ // published_node_ids MAY include nodes not published to or
903
+ // reported by the SP. The CO MUST be resilient to that.
904
+ repeated string published_node_ids = 1 ;
905
+
906
+ // Information about the current condition of the volume.
907
+ // This field is OPTIONAL.
908
+ // This field MUST be specified if the
909
+ // VOLUME_CONDITION controller capability is supported.
910
+ VolumeCondition volume_condition = 2 ;
911
+ }
912
+
913
+ // This field is REQUIRED
914
+ Volume volume = 1 ;
915
+
916
+ // This field is REQUIRED.
917
+ VolumeStatus status = 2 ;
918
+ }
874
919
message GetCapacityRequest {
875
920
// If specified, the Plugin SHALL report the capacity of the storage
876
921
// that can be used to provision volumes that satisfy ALL of the
@@ -945,6 +990,23 @@ message ControllerServiceCapability {
945
990
// Indicates the SP supports the
946
991
// ListVolumesResponse.entry.published_nodes field
947
992
LIST_VOLUMES_PUBLISHED_NODES = 10 ;
993
+
994
+ // Indicates the SP supports controller level volume condition.
995
+ // An SP MAY implement `VolumeCondition` in only the Controller
996
+ // Plugin, only the Node Plugin, or both.
997
+ // If `VolumeCondition` is implemented in both the Controller and
998
+ // Node Plugins, it SHALL report from different perspectives.
999
+ // If for some reason Controller and Node Plugins report
1000
+ // misaligned volume conditions, CO SHALL assume the worst case
1001
+ // is the truth.
1002
+ // Note that, for alpha, `VolumeCondition` is intended be
1003
+ // informative for humans only, not for automation.
1004
+ VOLUME_CONDITION = 11 [(alpha_enum_value) = true ];
1005
+
1006
+ // Indicates the SP supports the ControllerGetVolume RPC.
1007
+ // This enables COs to, for example, fetch per volume
1008
+ // condition after a volume is provisioned.
1009
+ GET_VOLUME = 12 [(alpha_enum_value) = true ];
948
1010
}
949
1011
950
1012
Type type = 1 ;
@@ -1273,6 +1335,11 @@ message NodeGetVolumeStatsRequest {
1273
1335
message NodeGetVolumeStatsResponse {
1274
1336
// This field is OPTIONAL.
1275
1337
repeated VolumeUsage usage = 1 ;
1338
+ // Information about the current condition of the volume.
1339
+ // This field is OPTIONAL.
1340
+ // This field MUST be specified if the VOLUME_CONDITION node
1341
+ // capability is supported.
1342
+ VolumeCondition volume_condition = 2 [(alpha_field) = true ];
1276
1343
}
1277
1344
1278
1345
message VolumeUsage {
@@ -1296,6 +1363,20 @@ message VolumeUsage {
1296
1363
// Units by which values are measured. This field is REQUIRED.
1297
1364
Unit unit = 4 ;
1298
1365
}
1366
+
1367
+ // VolumeCondition represents the current condition of a volume
1368
+ message VolumeCondition {
1369
+ option (alpha_message) = true ;
1370
+
1371
+ // Normal volumes are available for use and operating optimally.
1372
+ // An abnormal volume does not meet these criteria.
1373
+ // This field is REQUIRED.
1374
+ bool abnormal = 1 ;
1375
+
1376
+ // The message describing the condition of the volume.
1377
+ // This field is REQUIRED.
1378
+ string message = 2 ;
1379
+ }
1299
1380
message NodeGetCapabilitiesRequest {
1300
1381
// Intentionally empty.
1301
1382
}
@@ -1318,6 +1399,18 @@ message NodeServiceCapability {
1318
1399
GET_VOLUME_STATS = 2 ;
1319
1400
// See VolumeExpansion for details.
1320
1401
EXPAND_VOLUME = 3 ;
1402
+ // Indicates the SP supports node level volume condition.
1403
+ // An SP MAY implement `VolumeCondition` in only the Node
1404
+ // Plugin, only the Controller Plugin, or both.
1405
+ // If `VolumeCondition` is implemented in both the Node and
1406
+ // Controller Plugins, it SHALL report from different
1407
+ // perspectives.
1408
+ // If for some reason Node and Controller Plugins report
1409
+ // misaligned volume conditions, CO SHALL assume the worst case
1410
+ // is the truth.
1411
+ // Note that, for alpha, `VolumeCondition` is intended to be
1412
+ // informative for humans only, not for automation.
1413
+ VOLUME_CONDITION = 4 [(alpha_enum_value) = true ];
1321
1414
}
1322
1415
1323
1416
Type type = 1 ;
0 commit comments