Skip to content

Commit b514162

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

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

spec.md

+83
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 {
@@ -843,6 +848,22 @@ 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 iops
853+
// requirement of the volume to be provisioned. If not specified, the
854+
// Plugin MAY choose an implementation-defined iops range. If
855+
// specified it MUST always be honored, even when creating volumes
856+
// from a source; which MAY force some backends to internally extend
857+
// the volume after creating it.
858+
int64 iops = 8;
859+
860+
// This field is OPTIONAL. This allows the CO to specify the throughput
861+
// requirement of the volume to be provisioned. If not specified, the
862+
// Plugin MAY choose an implementation-defined throughput range. If
863+
// specified it MUST always be honored, even when creating volumes
864+
// from a source; which MAY force some backends to internally extend
865+
// the volume after creating it.
866+
int64 throughput = 9;
846867
}
847868
848869
// Specifies what source the volume will be created from. One of the
@@ -1223,6 +1244,8 @@ The CO MUST implement the specified error recovery behavior when it encounters t
12231244
| 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. |
12241245
| 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. |
12251246
| 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. |
1247+
| 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. |
1248+
| 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. |
12261249

12271250

12281251
#### `DeleteVolume`
@@ -1617,6 +1640,62 @@ The CO MUST implement the specified error recovery behavior when it encounters t
16171640
|-----------|-----------|-------------|-------------------|
16181641
| 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. |
16191642

1643+
1644+
#### `ModifyVolume`
1645+
1646+
A Controller plugin SHALL implement this RPC call. This RPC allows the CO to change key QoS parameters(iops and throughput) of a volume.
1647+
1648+
This operation MUST be idempotent. The requested iops and throughput values can be greater than or less than the current values.
1649+
1650+
1651+
```protobuf
1652+
message ModifyVolumeRequest {
1653+
// Contains identity information for the existing volume.
1654+
// This field is REQUIRED.
1655+
int64 volume_id = 1
1656+
1657+
// This field is OPTIONAL.This allows the CO to specify the
1658+
// iops of the volume to be updated to. The unit is IO per
1659+
// second per volume.
1660+
// If specified it MUST always be honored.
1661+
// A value of 0 is equal to an unspecified field value.
1662+
int64 iops = 2
1663+
1664+
// This field is OPTIONAL.This allows the CO to specify the
1665+
// throughput of the volume to be updated to. The unit is Mib per
1666+
// second per volume.
1667+
// If specified it MUST always be honored.
1668+
// A value of 0 is equal to an unspecified field value.
1669+
string throughput = 3
1670+
}
1671+
1672+
message ModifyVolumeResponse {
1673+
// The iops of the volume is set. This field is OPTIONAL.
1674+
google.protobuf.Int64Value iops = 1
1675+
// The throughput of the volume is set. This field is OPTIONAL.
1676+
google.protobuf.Int64Value throughput = 2
1677+
}
1678+
```
1679+
1680+
##### Definition of Iops and Throughput
1681+
1682+
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.
1683+
1684+
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.
1685+
1686+
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.
1687+
1688+
1689+
##### ModifyVolume Errors
1690+
1691+
| Condition | gRPC Code | Description | Recovery Behavior |
1692+
|-----------|-----------|-------------|-------------------|
1693+
| 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. |
1694+
| 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. |
1695+
| 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. |
1696+
| 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. |
1697+
| 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. |
1698+
16201699
#### `GetCapacity`
16211700

16221701
A Controller Plugin MUST implement this RPC call if it has `GET_CAPACITY` controller capability.
@@ -1773,6 +1852,10 @@ message ControllerServiceCapability {
17731852
// SINGLE_NODE_SINGLE_WRITER and/or SINGLE_NODE_MULTI_WRITER are
17741853
// supported, in order to permit older COs to continue working.
17751854
SINGLE_NODE_MULTI_WRITER = 13 [(alpha_enum_value) = true];
1855+
1856+
// Indicates the SP supports modifying iops and throughput of the volume
1857+
// See ModifyVolume for details.
1858+
MODIFY_VOLUME = 14 [(alpha_enum_value) = true];
17761859
}
17771860
17781861
Type type = 1;

0 commit comments

Comments
 (0)