Skip to content

Commit a249266

Browse files
committed
Define DeleteVolume behavior with snapshots
Spec is not clear on what should happen when on a DeleteVolume call when the volume has snapshots. This patch clarifies the situation by explicitly mentioning that the operation should complete and the snapshots should still be operational. Closes: #346
1 parent 37e7406 commit a249266

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spec.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,12 @@ This RPC will be called by the CO to deprovision a volume.
11311131
This operation MUST be idempotent.
11321132
If a volume corresponding to the specified `volume_id` does not exist or the artifacts associated with the volume do not exist anymore, the Plugin MUST reply `0 OK`.
11331133

1134+
CSI plugins SHOULD treat volumes independent from their snapshots.
1135+
1136+
If the Controller Plugin supports deleting a volume without affecting its existing snapshots, then these snapshots MUST still be fully operational and acceptable as sources for new volumes as well as appear on `ListSnapshot` calls once the volume has been deleted.
1137+
1138+
When a Controller Plugin does not support deleting a volume without affecting its existing snapshots, then the volume MUST NOT be altered in any way by the request and the operation must return the `FAILED_PRECONDITION` error code and MAY include meaningful human-readable information in the `status.message` field.
1139+
11341140
```protobuf
11351141
message DeleteVolumeRequest {
11361142
// The ID of the volume to be deprovisioned.
@@ -1156,7 +1162,7 @@ The CO MUST implement the specified error recovery behavior when it encounters t
11561162

11571163
| Condition | gRPC Code | Description | Recovery Behavior |
11581164
|-----------|-----------|-------------|-------------------|
1159-
| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be deleted because it is in use by another resource. | Caller SHOULD ensure that there are no other resources using the volume, and then retry with exponential back off. |
1165+
| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be deleted because it is in use by another resource or has snapshots and the plugin doesn't treat them as independent entities. | Caller SHOULD ensure that there are no other resources using the volume and that it has no snapshots, and then retry with exponential back off. |
11601166

11611167

11621168
#### `ControllerPublishVolume`

0 commit comments

Comments
 (0)