Skip to content

Commit e09188b

Browse files
committed
GetCapacityResponse: add maximum_volume_size
This new field has a more precisely defined semantic than the existing available_capacity. It is intended for checking in advance in which topology a CreateVolume call might succeed. Checking that based on available_capacity is less precise, for example because fragmentation might prevent creating a single volume that uses all available capacity. The new value has to be returned in a message to allow the caller to determine whether the value was provided.
1 parent 396c333 commit e09188b

File tree

3 files changed

+369
-271
lines changed

3 files changed

+369
-271
lines changed

csi.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,24 @@ message GetCapacityResponse {
947947
// storage. This field is REQUIRED.
948948
// The value of this field MUST NOT be negative.
949949
int64 available_capacity = 1;
950+
951+
// The largest size that may be used in a CreateVolume call
952+
// to create a volume with the same parameters as those in
953+
// GetCapacityRequest.
954+
//
955+
// If `volume_capabilities` or `parameters` is
956+
// specified in the request, the Plugin SHALL take those into
957+
// consideration when calculating the maximum volume size of the
958+
// storage.
959+
//
960+
// This field is OPTIONAL. COs MAY use it to make decision about
961+
// where to create volumes.
962+
Capacity maximum_volume_size = 2 [(alpha_field) = true];
963+
}
964+
965+
message Capacity {
966+
// Number of bytes. MUST NOT be negative.
967+
int64 value = 1;
950968
}
951969
message ControllerGetCapabilitiesRequest {
952970
// Intentionally empty.

0 commit comments

Comments
 (0)