You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-storage/3476-volume-group-snapshot/README.md
+13-16Lines changed: 13 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,11 +149,14 @@ This proposal introduces new CRDs VolumeGroupSnapshot, VolumeGroupSnapshotConten
149
149
150
150
A VolumeGroupSnapshot can be created from multiple PVCs with a label on the PVCs specified by the labelSelector in the VolumeGroupSnapshot if the CSI driver supports the CREATE_DELETE_GET_VOLUME_GROUP_SNAPSHOT capability.
151
151
152
+
Note: In the following, we will use VolumeGroupSnapshot Controller to refer to the control logic for VolumeGroupSnapshot. This is not a new controller. It will be new control logic added to the existing Snapshot Controller and the csi-snapshotter sidecar.
153
+
152
154
#### Dynamic provisioning
153
155
154
156
* Admin creates a VolumeGroupSnapshotClass.
155
157
* User creates a VolumeGroupSnapshot with label selector that matches the label applied to all PVCs to be snapshotted together.
156
-
* This will trigger the VolumeGroupSnapshot controller to create a VolumeGroupSnapshotContent API object, and also call the CreateVolumeGroupSnapshot CSI function. It will also create multiple VolumeSnapshot API objects with volumeGroupSnapshotName in the status and the corresponding VolumeSnapshotContents with the snapshot handle. The VolumeSnapshot and VolumeSnapshotContent will point to each other before these objects are created in the API server to avoid triggering the VolumeSnapshot controller to create new individual objects. The CSI snapshotter sidecar will not call CSI driver in this case. If needed, GetVolumeGroupSnapshot CSI function will be called to retrieve individual snapshot statuses until all snapshots are ready to use.
158
+
* This will trigger the VolumeGroupSnapshot controller to create a VolumeGroupSnapshotContent API object, and also call the CreateVolumeGroupSnapshot CSI function.
159
+
* 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.
157
160
* CreateVolumeGroupSnapshot CSI function response
158
161
* 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 SnapshotList in the VolumeGroupSnapshot Status and SnapshotContentList in the VolumeGroupSnapshotContent Status.
159
162
@@ -176,7 +179,7 @@ status:
176
179
177
180
Admin can create a VolumeGroupSnapshotContent, specifying an existing VolumeGroupSnapshotHandle in the storage system and specifying a VolumeGroupSnapshot name and namespace. Then the user creates a VolumeGroupSnapshot that points to the VolumeGroupSnapshotContent name.
178
181
179
-
Admin will retrieve all volumeSnapshotHandles in the Volume Group Snapshot from the storage system, create VolumeSnapshotContents pointing to the volumeSnapshotHandles. Then the user can create VolumeSnapshots pointing to the VolumeSnapshotContents.
182
+
The controller will retrieve all volumeSnapshotHandles in the Volume Group Snapshot from the storage system, create VolumeSnapshotContents pointing to the volumeSnapshotHandles. Then the controller will create VolumeSnapshots pointing to the VolumeSnapshotContents.
A new external VolumeGroupSnapshot controller will handle VolumeGroupSnapshotClass, VolumeGroupSnapshot, and VolumeGroupSnapshotContent resources. We may need to split this into two controllers, one common controller that handles common functions such as binding, and one sidecar controller that calls the CSI driver.
508
+
The new VolumeGroupSnapshot logic will be added to the Snapshot Controller and the csi-snapshotter sidecar to handle VolumeGroupSnapshotClass, VolumeGroupSnapshot, and VolumeGroupSnapshotContent resources accordingly.
506
509
507
-
Snapshot controller will be modified so that it will not delete an indiviual VolumeSnapshot that is part of a VolumeGroupSnapshot. External snapshotter sidecar will be modified so that it will not delete an individual VolumeSnapshotContent that is part of a VolumeGroupSnapshotContent.
510
+
Snapshot controller will also be modified so that it will not delete an indiviual VolumeSnapshot that is part of a VolumeGroupSnapshot. External snapshotter sidecar will be modified so that it will not delete an individual VolumeSnapshotContent that is part of a VolumeGroupSnapshotContent.
508
511
509
512
### CSI Changes
510
513
@@ -688,9 +691,9 @@ _This section must be completed when targeting alpha to a release._
688
691
***How can this feature be enabled / disabled in a live cluster?**
689
692
-[x] Other
690
693
- Describe the mechanism:
691
-
The external volume group snapshot controllers do not have a
692
-
feature gate because they are out of tree.
693
-
It is enabled when these external controller sidecars are deployed with the CSI driver.
694
+
We don't have a feature gate because this feature is out of tree.
695
+
We will use a flag called enable-volume-group-snapshot to enable this
696
+
feature when the snapshot controller and csi-snapshotter sidecar are started.
694
697
- Will enabling / disabling the feature require downtime of the control
695
698
plane?
696
699
From the controller side, it only affects the external controller sidecars.
@@ -703,21 +706,15 @@ _This section must be completed when targeting alpha to a release._
703
706
704
707
***Can the feature be disabled once it has been enabled (i.e. can we rollback
705
708
the enablement)?**
706
-
Yes. In order to disable this feature once it has been enabled, we first need to make sure that all VolumeGroupSnapshot API objects are deleted. Then the new controllers for VolumeGroupSnapshot can be stopped/removed, and external-snapshotter controller/sidecar can be downgraded to a version without this feature.
707
-
708
-
If we don't delete the VolumeGroupSnapshot API objects and CRDs but just uninstall the VolumeGroupSnapshot controllers and downgrade the other sidecars, the API objects continue to exist in the API server. User may delete an individual VolumeSnapshot that is associated with a VolumeGroupSnapshot. After that if the user starts the controllers/sidecars again, the pre-existing VolumeGroupSnapshot still has the deleted individual VolumeSnapshots in its status so it is out of sync with the storage system and provides out-dated information to the user. User can still restore individual PVCs from individual VolumeSnapshots that are not deleted, but they cannot restore PVCs from the deleted VolumeSnapshots.
709
-
710
-
If the API objects and VolumeGroupSnapshot controllers are running, but the snapshotter sidecars are downgraded to a lower version that does not support this feature, it should be fine as individual snapshots that are part of a group snapshot will be created and deleted by the VolumeGroupSnapshot controller.
709
+
Yes. In order to disable this feature once it has been enabled, we first need to make sure that all VolumeGroupSnapshot API objects are deleted. Then external-snapshotter controller/sidecar can be restarted without the feature flag.
711
710
712
-
If the external-snapshotter sidecar which supports this feature is running but VolumeGroupSnapshot controller is not (CRDs are still installed), creating VolumeGroupSnapshot will not be successful. Ready status in VolumeGroupSnapshot API objects will be false until those controllers are running again.
711
+
If we don't delete the VolumeGroupSnapshot API objects and CRDs but just disable the feature and restart Snapshot controller and the csi-snapshotter sidecar, the API objects continue to exist in the API server. User may delete an individual VolumeSnapshot that is associated with a VolumeGroupSnapshot. After that if the user enables the feature again, the pre-existing VolumeGroupSnapshot still has the deleted individual VolumeSnapshots in its status so it is out of sync with the storage system and provides out-dated information to the user. User can still restore individual PVCs from individual VolumeSnapshots that are not deleted, but they cannot restore PVCs from the deleted VolumeSnapshots.
713
712
714
713
***What happens if we reenable the feature if it was previously rolled back?**
715
714
We will be able to create new VolumeGroupSnapshot API objects again.
716
715
717
716
***Are there any tests for feature enablement/disablement?**
718
-
Since there is no feature gate for this feature on the external controller side and the only way to
719
-
enable or disable this feature is to install or unistall the sidecar, we cannot write
720
-
tests for feature enablement/disablement.
717
+
Unit tests will be added with or without the feature flag enabled.
0 commit comments