Skip to content

Commit bf86ef5

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

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

spec.md

+64
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,57 @@ 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+
// Throughput of the volume to be updated to. The unit is Mib per
1653+
// second per volume.
1654+
// If specified it MUST always be honored.
1655+
map<string, string> parameters = 2;
1656+
}
1657+
1658+
message ModifyVolumeRequest {
1659+
// Contains identity information for the existing volume.
1660+
// This field is REQUIRED.
1661+
string volume_id = 1
1662+
// This field is OPTIONAL.This allows the CO to specify the
1663+
// volume performance class parameters to apply.
1664+
map<string, string> volume_performance_class_parameters = 2;
1665+
}
1666+
message ModifyVolumeResponse {
1667+
VolumePerformanceClass volume_Performance_class = 1
1668+
}
1669+
1670+
```
1671+
1672+
##### ModifyVolume Errors
1673+
1674+
| Condition | gRPC Code | Description | Recovery Behavior |
1675+
|-----------|-----------|-------------|-------------------|
1676+
| 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. |
1677+
| 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. |
1678+
| 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. |
1679+
16201680
#### `GetCapacity`
16211681

16221682
A Controller Plugin MUST implement this RPC call if it has `GET_CAPACITY` controller capability.
@@ -1773,6 +1833,10 @@ message ControllerServiceCapability {
17731833
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
17741834
// supported, in order to permit older COs to continue working.
17751835
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
1836+
1837+
// Indicates the SP supports modifying volume with performance specific
1838+
// See ModifyVolume for details.
1839+
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
17761840
}
17771841
17781842
Type type = 1;

0 commit comments

Comments
 (0)