Skip to content

Commit 3d02af5

Browse files
committed
Address review comments
1 parent 3b445f0 commit 3d02af5

File tree

1 file changed

+23
-4
lines changed
  • keps/sig-storage/3476-volume-group-snapshot

1 file changed

+23
-4
lines changed

keps/sig-storage/3476-volume-group-snapshot/README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,11 @@ Note: In the following, we will use VolumeGroupSnapshot Controller to refer to t
133133

134134
* Admin creates a VolumeGroupSnapshotClass.
135135
* User creates a VolumeGroupSnapshot with label selector that matches the label applied to all PVCs to be snapshotted together.
136-
* This will trigger the VolumeGroupSnapshot controller to create a VolumeGroupSnapshotContent API object, and also call the CreateVolumeGroupSnapshot CSI function.
137-
* The controller will retrieve all volumeSnapshotHandles in the Volume Group Snapshot from the CSI CreateVolumeGroupSnapshotResponse, create VolumeSnapshotContents pointing to the volumeSnapshotHandles. Then the controller will create VolumeSnapshots pointing to the VolumeSnapshotContents.
136+
* This will trigger the VolumeGroupSnapshot controller to create a VolumeGroupSnapshotContent API object. The group snapshot logic in the csi-snapshotter sidecar will call the CreateVolumeGroupSnapshot CSI function.
137+
* The group snapshot logic in csi-snapshotter will retrieve all volumeSnapshotHandles and their source volumeHandles in the Volume Group Snapshot from the CSI CreateVolumeGroupSnapshotResponse, and populate the VolumeSnapshotHandlePairList field in the VolumeGroupSnapshotContent status.
138+
* The VolumeGroupSnapshot controller will be watching the VolumeGroupSnapshotContent, and create VolumeSnapshotContents pointing to the volumeSnapshotHandles once they are available in the VolumeGroupSnapshotContent status. Then the controller will create VolumeSnapshots pointing to the VolumeSnapshotContents.
138139
* CreateVolumeGroupSnapshot CSI function response
139-
* The CreateVolumeGroupSnapshot CSI function should return a list of snapshots (Snapshot message defined in CSI Spec) in its response. The VolumeGroupSnapshot controller can use the returned list of snapshots to construct corresponding individual VolumeSnapshotContents and VolumeSnapshots, wait for VolumeSnapshots and VolumeSnapshotContents to be bound, and update SnapshotRefList in the VolumeGroupSnapshot Status and SnapshotContentList in the VolumeGroupSnapshotContent Status.
140+
* The CreateVolumeGroupSnapshot CSI function should return a list of snapshots (Snapshot message defined in CSI Spec) in its response. The group snapshot logic in the csi-snapshotter sidecar will update the VolumeSnapshotHandlePairList field in the VolumeGroupSnapshotContent status based on the returned list of snapshots from the CSI call. The VolumeGroupSnapshot controller can use VolumeSnapshotHandles to construct corresponding individual VolumeSnapshotContents and VolumeSnapshots, wait for VolumeSnapshots and VolumeSnapshotContents to be bound, and update PVCVolumeSnapshotRefList in the VolumeGroupSnapshot Status and PVVolumeSnapshotContentList in the VolumeGroupSnapshotContent Status.
140141
* Individual VolumeSnapshots will be named in this format:
141142
* <snap>-<hash of VolumeGroupSnapshot UUID+PVC UUID+timestamp>
142143
* A label with VolumeGroupSnapshot name will also be added to the VolumeSnapshot
@@ -463,6 +464,17 @@ type GroupSnapshotHandles struct {
463464
VolumeSnapshotHandles []string
464465
}
465466
467+
// VolumeSnapshotHandlePair defines a pair of a source volume handle and a snapshot handle
468+
type VolumeSnapshotHandlePair struct {
469+
// VolumeHandle is a unique id returned by the CSI driver to identify a volume
470+
// on the storage system
471+
VolumeHandle string
472+
473+
// SnapshotHandle is a unique id returned by the CSI driver to identify a volume
474+
// snapshot on the storage system
475+
SnapshotHandle string
476+
}
477+
466478
Type VolumeGroupSnapshotContentStatus struct {
467479
// VolumeGroupSnapshotHandle is a unique id returned by the CSI driver
468480
// to identify the VolumeGroupSnapshot on the storage system.
@@ -471,6 +483,12 @@ Type VolumeGroupSnapshotContentStatus struct {
471483
// +optional
472484
VolumeGroupSnapshotHandle *string
473485
486+
// VolumeSnapshotHandlePairList is a list of CSI "volume_id" and "snapshot_id"
487+
// pair returned by the CSI driver to identify snapshots and their source volumes
488+
// on the storage system.
489+
// +optional
490+
VolumeSnapshotHandlePairList []VolumeSnapshotHandlePair
491+
474492
// ReadyToUse becomes true when ReadyToUse on all individual snapshots become true
475493
// +optional
476494
ReadyToUse *bool
@@ -481,6 +499,7 @@ Type VolumeGroupSnapshotContentStatus struct {
481499
// +optional
482500
Error *VolumeSnapshotError
483501
502+
// NOTE: We will consider removing this field after testing.
484503
// PVVolumeSnapshotContentList is the list of pairs of PV and
485504
// VolumeSnapshotContent for this group snapshot
486505
// The maximum number of allowed snapshots in the group is 100.
@@ -964,7 +983,7 @@ _This section must be completed when targeting beta graduation to a release._
964983

965984
* **What are other known failure modes?**
966985
For each of them, fill in the following information by copying the below template:
967-
- [Failure mode brief description]
986+
- [Failure mode refers to a volume group snapshot creation or deletion failure]
968987
- Detection: How can it be detected via metrics? Stated another way:
969988
how can an operator troubleshoot without logging into a master or worker node?
970989

0 commit comments

Comments
 (0)