Skip to content

Commit 98160fe

Browse files
Spec ModifyVolume for QoS kep-3751
1 parent b01039c commit 98160fe

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

csi.proto

+28
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ service Controller {
100100
returns (ControllerGetVolumeResponse) {
101101
option (alpha_method) = true;
102102
}
103+
104+
rpc ControllerModifyVolume (ModifyVolumeRequest)
105+
returns (ModifyVolumeResponse) {
106+
option (alpha_method) = true;
107+
}
103108
}
104109

105110
service GroupController {
@@ -376,6 +381,10 @@ message CreateVolumeRequest {
376381
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
377382
// choose where the provisioned volume is accessible from.
378383
TopologyRequirement accessibility_requirements = 7;
384+
385+
// This field is OPTIONAL. This allows the CO to specify the
386+
// volume performance class parameters to apply.
387+
map<string, string> mutable_parameters = 8;
379388
}
380389

381390
// Specifies what source the volume will be created from. One of the
@@ -974,6 +983,21 @@ message ControllerGetVolumeResponse {
974983
// This field is REQUIRED.
975984
VolumeStatus status = 2;
976985
}
986+
message ModifyVolumeRequest {
987+
option (alpha_message) = true;
988+
989+
// Contains identity information for the existing volume.
990+
// This field is REQUIRED.
991+
string volume_id = 1
992+
// This field is OPTIONAL.This allows the CO to specify the
993+
// mutable parameters to apply.
994+
map<string, string> mutable_parameters = 2;
995+
}
996+
997+
message ModifyVolumeResponse {
998+
option (alpha_message) = true;
999+
}
1000+
9771001
message GetCapacityRequest {
9781002
// If specified, the Plugin SHALL report the capacity of the storage
9791003
// that can be used to provision volumes that satisfy ALL of the
@@ -1113,6 +1137,10 @@ message ControllerServiceCapability {
11131137
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
11141138
// supported, in order to permit older COs to continue working.
11151139
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
1140+
1141+
// Indicates the SP supports modifying volume with mutable
1142+
// parameters. See ModifyVolume for details.
1143+
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
11161144
}
11171145

11181146
Type type = 1;

spec.md

+47
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,11 @@ service Controller {
381381
returns (ControllerGetVolumeResponse) {
382382
option (alpha_method) = true;
383383
}
384+
385+
rpc ControllerModifyVolume (ModifyVolumeRequest)
386+
returns (ModifyVolumeResponse) {
387+
option (alpha_method) = true;
388+
}
384389
}
385390
386391
service GroupController {
@@ -843,6 +848,10 @@ message CreateVolumeRequest {
843848
// VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
844849
// choose where the provisioned volume is accessible from.
845850
TopologyRequirement accessibility_requirements = 7;
851+
852+
// This field is OPTIONAL. This allows the CO to specify the
853+
// volume performance class parameters to apply.
854+
map<string, string> mutable_parameters = 8;
846855
}
847856
848857
// Specifies what source the volume will be created from. One of the
@@ -1617,6 +1626,40 @@ The CO MUST implement the specified error recovery behavior when it encounters t
16171626
|-----------|-----------|-------------|-------------------|
16181627
| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. |
16191628

1629+
1630+
#### `ModifyVolume`
1631+
1632+
A Controller plugin SHALL implement this RPC call. If the MODIFY_VOLUME capability is present, a Controller plugin MUST implement this RPC call. This RPC allows the CO to change mutable key attributes of a volume.
1633+
1634+
This operation MUST be idempotent. The preset parameters in the VolumePerformanceClass can be greater than or less than the current values.
1635+
1636+
1637+
```protobuf
1638+
message ModifyVolumeRequest {
1639+
option (alpha_message) = true;
1640+
1641+
// Contains identity information for the existing volume.
1642+
// This field is REQUIRED.
1643+
string volume_id = 1
1644+
// This field is OPTIONAL.This allows the CO to specify the
1645+
// mutable parameters to apply.
1646+
map<string, string> mutable_parameters = 2;
1647+
}
1648+
1649+
message ModifyVolumeResponse {
1650+
option (alpha_message) = true;
1651+
}
1652+
1653+
```
1654+
1655+
##### ModifyVolume Errors
1656+
1657+
| Condition | gRPC Code | Description | Recovery Behavior |
1658+
|-----------|-----------|-------------|-------------------|
1659+
| Parameters not supported | 3 INVALID_ARGUMENT | Indicates that the CO has specified volume performance parameters not supported by the volume. | Caller MAY verify volume performance parameters. |
1660+
| Exceeds capabilities | 3 INVALID_ARGUMENT | Indicates that the CO has specified capabilities not supported by the volume. | Caller MAY verify volume capabilities by calling ValidateVolumeCapabilities and retry with matching capabilities. |
1661+
| Volume does not exist | 5 NOT FOUND | Indicates that a volume corresponding to the specified volume_id does not exist. | Caller MUST verify that the volume_id is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. |
1662+
16201663
#### `GetCapacity`
16211664

16221665
A Controller Plugin MUST implement this RPC call if it has `GET_CAPACITY` controller capability.
@@ -1773,6 +1816,10 @@ message ControllerServiceCapability {
17731816
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
17741817
// supported, in order to permit older COs to continue working.
17751818
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
1819+
1820+
// Indicates the SP supports modifying volume with mutable
1821+
// parameters. See ModifyVolume for details.
1822+
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
17761823
}
17771824
17781825
Type type = 1;

0 commit comments

Comments
 (0)