rbd: add locking for VolumeGroupSnapshot operations

Add VolumeGroupLocks in the CSI Controller Server so that operations are
protected against concurrent requests for the same VolumeGroupSnapshot.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2024-11-11 12:42:48 +01:00
committed by mergify[bot]
parent f3d40f9e5a
commit d98516e9d8
3 changed files with 38 additions and 4 deletions

View File

@ -53,6 +53,10 @@ type ControllerServer struct {
// A map storing all volumes/snapshots with ongoing operations.
OperationLocks *util.OperationLock
// A map storing all volumes with ongoing operations so that additional operations
// for that same volume (as defined by volumegroup ID/volumegroup name) return an Aborted error
VolumeGroupLocks *util.VolumeLocks
// Cluster name
ClusterName string