Skip to content

Commit 17b0aa5

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

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

spec.md

+67
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 (ControllerModifyVolumeRequest)
386+
returns (ControllerModifyVolumeResponse) {
387+
option (alpha_method) = true;
388+
}
384389
}
385390
386391
service GroupController {
@@ -1223,6 +1228,8 @@ The CO MUST implement the specified error recovery behavior when it encounters t
12231228
| Volume already exists but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified volume `name` already exists but is incompatible with the specified `capacity_range`, `volume_capabilities`, `parameters`, `accessibility_requirements` or `volume_content_source`. | Caller MUST fix the arguments or use a different `name` before retrying. |
12241229
| Unable to provision in `accessible_topology` | 8 RESOURCE_EXHAUSTED | Indicates that although the `accessible_topology` field is valid, a new volume can not be provisioned with the specified topology constraints. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST ensure that whatever is preventing volumes from being provisioned in the specified location (e.g. quota issues) is addressed before retrying with exponential backoff. |
12251230
| Unsupported `capacity_range` | 11 OUT_OF_RANGE | Indicates that the capacity range is not allowed by the Plugin, for example when trying to create a volume smaller than the source snapshot or the Plugin does not support creating volumes larger than the source snapshot or source volume. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the capacity range before retrying. |
1231+
| Unsupported `iops_range` | 11 OUT_OF_RANGE | Indicates that the iops range is not allowed by the Plugin. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the iops range before retrying. |
1232+
| Unsupported `throughput_range` | 11 OUT_OF_RANGE | Indicates that the throughput range is not allowed by the Plugin. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the throughput range before retrying. |
12261233

12271234

12281235
#### `DeleteVolume`
@@ -1617,6 +1624,62 @@ The CO MUST implement the specified error recovery behavior when it encounters t
16171624
|-----------|-----------|-------------|-------------------|
16181625
| 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. |
16191626

1627+
1628+
#### `ModifyVolume`
1629+
1630+
A Controller plugin SHALL implement this RPC call. This RPC allows the CO to change key QoS parameters(iops and throughput) of a volume.
1631+
1632+
This operation MUST be idempotent. The requested iops and throughput values can be greater than or less than the current values.
1633+
1634+
1635+
```protobuf
1636+
message ModifyVolumeRequest {
1637+
// Contains identity information for the existing volume.
1638+
// This field is REQUIRED.
1639+
int64 volume_id = 1
1640+
1641+
// This field is OPTIONAL.This allows the CO to specify the
1642+
// iops of the volume to be updated to. The unit is IO per
1643+
// second per volume.
1644+
// If specified it MUST always be honored.
1645+
// A value of 0 is equal to an unspecified field value.
1646+
int64 iops = 2
1647+
1648+
// This field is OPTIONAL.This allows the CO to specify the
1649+
// throughput of the volume to be updated to. The unit is Mib per
1650+
// second per volume.
1651+
// If specified it MUST always be honored.
1652+
// A value of 0 is equal to an unspecified field value.
1653+
string throughput = 3
1654+
}
1655+
1656+
message ModifyVolumeResponse {
1657+
// The iops of the volume is set. This field is OPTIONAL.
1658+
google.protobuf.Int64Value iops = 1
1659+
// The throughput of the volume is set. This field is OPTIONAL.
1660+
google.protobuf.Int64Value throughput = 2
1661+
}
1662+
```
1663+
1664+
##### Definition of Iops and Throughput
1665+
1666+
The iops and throughput in this API is referring to read/write iops and read/write throughput. The unit is IO per second per volume for iops, and Mib per second per volume for throughput. The parameters SHOULD be independently configured from capacity.
1667+
1668+
The SP MUST reserve the requested iops and throughput for the volume. This means that the workload is guaranteed to the requested resources and will not be throttled below the request. This is also the maximum iops/throughput the user can reach in their workload.
1669+
1670+
In physically-limited environments, updating performance parameters independently from capacity may result in underutilized resources. The SP MAY enforce limits on the allowed values. If the requested iops, throughput and capacity are not compatible with each other, the SP MUST return the OUT_OF_RANGE error code.
1671+
1672+
1673+
##### ModifyVolume Errors
1674+
1675+
| Condition | gRPC Code | Description | Recovery Behavior |
1676+
|-----------|-----------|-------------|-------------------|
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+
| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be updated because it is currently published on a node but the plugin does not have ONLINE modification capability. | Caller SHOULD ensure that volume is not published and retry with exponential back off. |
1680+
| Unsupported `iops_range` | 11 OUT_OF_RANGE | Indicates that the iops range is not allowed by the Plugin. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the iops range before retrying. |
1681+
| Unsupported `throughput_range` | 11 OUT_OF_RANGE | Indicates that the throughput range is not allowed by the Plugin. More human-readable information MAY be provided in the gRPC `status.message` field. | Caller MUST fix the throughput range before retrying. |
1682+
16201683
#### `GetCapacity`
16211684

16221685
A Controller Plugin MUST implement this RPC call if it has `GET_CAPACITY` controller capability.
@@ -1773,6 +1836,10 @@ message ControllerServiceCapability {
17731836
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
17741837
// supported, in order to permit older COs to continue working.
17751838
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
1839+
1840+
// Indicates the SP supports modifying iops and throughput of the volume
1841+
// See ModifyVolume for details.
1842+
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
17761843
}
17771844
17781845
Type type = 1;

0 commit comments

Comments
 (0)