Skip to content

Commit

Permalink
Add Snapshot Support in CSI Spec
Browse files Browse the repository at this point in the history
This PR proposes to add snapshot support in CSI specification.
It proposes to add 3 new controller service RPCs, including
CreateSnapshot, DeleteSnapshot, and ListSnapshots, and modify
the existing ControllerGetCapabilitiesResponse and
CreateVolumeRequest.

There are several cases for using the snapshot data in a volume:

1. Create volume from snapshot: In this case, a new volume will be
created on the storage backend and the data in the snapshot will
be copied to the new volume. This case will be addressed by this
proposal.

2. Revert snapshot: In this case, data in the original volume
will be erased and replaced with data in the snapshot. This case
is out of scope for this proposal and should be handled by a
function of its own (not to be mixed with create volume from
snapshot) if it is proposed in the future.

The following changes will be made in the Service Controller:
- Add CreateSnapshot
- Add DeleteSnapshot
- Add ListSnapshots
- Modify CreateVolumeRequest to support creating a new volume from
  snapshot.
- Modify ControllerGetCapabilitiesResponse to return
  CREATE_DELETE_SNAPSHOT and LIST_SNAPSHOTS support capabilities.
- Create volume from snapshot is a REQUIRED functionality if
  CREATE_DELETE_SNAPSHOT is supported.

This proposal was drafted here:
https://docs.google.com/document/d/1oXVuDTNhXerr1UJ48tQrxF9J6vbm2LHVVC3z28655Qo/edit#

The PR container-storage-interface#207 is getting very big due to the large number of comments and some people
can't view it on Github, so close that one and submit a new PR here instead.
  • Loading branch information
xing-yang committed May 15, 2018
1 parent 4bbb5e3 commit 46f3c47
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 68 deletions.
3 changes: 2 additions & 1 deletion csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,11 @@ message SnapshotStatus {
// A snapshot is in error status.
ERROR = 3;
}
// This field is REQUIRED.
Type type = 1;

// Additional information to describe why a snapshot ended up in the
// `ERROR` status.
// `ERROR` status. This field is OPTIONAL.
string details = 2;
}
message DeleteSnapshotRequest {
Expand Down
Loading

0 comments on commit 46f3c47

Please sign in to comment.