Skip to content

Commit 9d3827e

Browse files
Spec ModifyVolume for QoS kep-3751
1 parent b01039c commit 9d3827e

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

Diff for: spec.md

+66
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> volume_performance_class_parameters = 8;
846855
}
847856
848857
// Specifies what source the volume will be created from. One of the
@@ -1617,6 +1626,59 @@ 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 key Performance parameters(iops and throughput) 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 VolumePerformanceClass {
1639+
// The name for the volume Performance class. This field is REQUIRED for
1640+
// idempotency.
1641+
// Any Unicode string that conforms to the length limit is allowed
1642+
// except those containing the following banned characters:
1643+
// U+0000-U+0008, U+000B, U+000C, U+000E-U+001F, U+007F-U+009F.
1644+
// (These are control characters other than commonly used whitespace.)
1645+
string name = 1;
1646+
// Volume Performance specific parameters passed in as opaque key-value pairs.
1647+
// This field is OPTIONAL. The driver is responsible for parsing and
1648+
// validating these parameters. COs will treat these as opaque.
1649+
// Example of valid parameters:
1650+
// Iops of the volume to be updated to. The unit is IO per
1651+
// second per volume. If specified it MUST always be honored.
1652+
// A value of 0 is equal to an unspecified field value.
1653+
// Throughput of the volume to be updated to. The unit is Mib per
1654+
// second per volume.
1655+
// If specified it MUST always be honored.
1656+
// A value of 0 is equal to an unspecified field value.
1657+
map<string, string> parameters = 2;
1658+
}
1659+
1660+
message ModifyVolumeRequest {
1661+
// Contains identity information for the existing volume.
1662+
// This field is REQUIRED.
1663+
string volume_id = 1
1664+
// This field is OPTIONAL.This allows the CO to specify the
1665+
// volume performance class parameters to apply.
1666+
map<string, string> volume_performance_class_parameters = 2;
1667+
}
1668+
message ModifyVolumeResponse {
1669+
VolumePerformanceClass volume_Performance_class = 1
1670+
}
1671+
1672+
```
1673+
1674+
##### ModifyVolume Errors
1675+
1676+
| Condition | gRPC Code | Description | Recovery Behavior |
1677+
|-----------|-----------|-------------|-------------------|
1678+
| 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. |
1679+
| 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. |
1680+
| 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. |
1681+
16201682
#### `GetCapacity`
16211683

16221684
A Controller Plugin MUST implement this RPC call if it has `GET_CAPACITY` controller capability.
@@ -1773,6 +1835,10 @@ message ControllerServiceCapability {
17731835
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
17741836
// supported, in order to permit older COs to continue working.
17751837
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
1838+
1839+
// Indicates the SP supports modifying volume with performance specific
1840+
// See ModifyVolume for details.
1841+
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
17761842
}
17771843
17781844
Type type = 1;

0 commit comments

Comments
 (0)