This commit includes:
1). Moves rbd errors from internal/util/errors to internal/rbd/errors.
2). Introduces ShouldRetryVolumeGroupGeneration helper function to determine
whether volume group generation should continue based on specific error types.
The function returns true if the error is of type ErrPoolNotFound,
ErrRBDGroupNotFound, ErrPermissionDenied. (Ceph user might not have access to
all the objects/pools where mapping exists)
Signed-off-by: Praveen M <m.praveen@ibm.com>
Fix status codes that are returned for Get/Delete RPC calls
for VolumeGroup/VolumeGroupSnapshot.
Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
This commit consolidates flatten logic checks for cloneDepth
and snapshotLimit in PrepareVolumeForSnapshot. This allows
the function to be called for both CreateSnapshot and
CreateVolumeGroupSnapshot.
Clone Depth check and flattening of grand parent image
now occurs before creation of snapshot starts.
This aligns better with how PVC-PVC clone and
PVC-restore process occurs currently.
Flattening the grandparent image once prevents
flattening of every newly created snapshot.
Snapshot in above para refers to k8s VolumeSnapshot
(which is backed by a rbd image).
Signed-off-by: Rakshith R <rar@redhat.com>
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>