Currently, CephCSI only uses listSnaps to determine
number of snapshots on a RBD image and uses snapshot
names as child image names to flatten them.
But child images may have different name(in case of
group snapshot) or they maybe in trash
(deleted k8s VolSnapshot with alive restored PVC).
The above problems are avoid by making use of both
snap and child image lists.
Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 09d848e017)
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>
(cherry picked from commit 9936033283)
This commit fixes the VolumeGroup UndoReservation
by using the correct RequestName of the VolumeGroup
instead of the volumeGroupHandle.
Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 51d0a08112)
This function deletes rbd snap and rbd image
backing k8s snapshot.
The same function is used for deleting
individual snapshots in group snapshot.
Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 797eceebb2)
Remove the vsg flag present in the older snapshotter
which is meant only for the Alpha Release and we are
no longer installing Alpha CRD.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a88f86e9a4)
updating the snapshot container ARG
to enable the vgs feature.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit eb66ec8177)
updating the snapshot client and
test to use v1beta1 client and API.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a17fef07e6)
updating the snapshotter image to 8.2.0
and update the flag to enable vgs
feature.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 5bfff89e04)
updating the snapshotter image to 8.2.0
and update the flag to enable vgs
feature.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 23da6d9b13)
updating the github action pull
request commentor to drop
older unsupported release and support
3.13 release.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a32ba13045)
On occasion there are inconsistencies in the CentOS or Ceph RPM
repositories. This can cause `dnf update` to fail when there are
conflicting versions of a package. By adding the `--nobest` option,
packages can get upgraded to an older version, but not the latest.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
(cherry picked from commit d8a040719e)
Some packages were updated to more recent versions, others were not. Now
everything is at the latest v0.31.3.
Signed-off-by: Niels de Vos <ndevos@ibm.com>
`ControllerExpandVolume` creates the credentials from
secrets but never actually uses it for anything.
The secrets map is passed on to `NewVolumeOptionsFromVolID`
which does the same check again. This patch removes the
extraneous step.
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
using os.RemoveAll will remove everything
in the director after the Umount we should
be using os.Remove only to remove the empty
directory
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
using os.RemoveAll will remove everything
in the director after the Umount we should
be using os.Remove only to remove the empty
directory
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
We should not be dependent on the CO to ensure
that it will serialize the request instead of
that we need to have own internal locks to ensure
that we dont do concurrent operations for same
request.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
We should not be dependent on the CO to ensure
that it will serialize the request instead of
that we need to have own internal locks to ensure
that we dont do concurrent operations for same
request.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
During PVC-PVC clone creation, parent of the datasource
image is flattened after checking for clone depth.
We need to account for data source image as well since
we're calculating depth from the parent image.
depthToAvoidFlatten = 3(datasource image + temp + final clone)
Signed-off-by: Rakshith R <rar@redhat.com>
CephCSI should not flatten image that can be mounted
for use by the user.
`checkFlatten()` was called in a recovery code flow
of PVC restored from snapshot and was missed while
refractoring in https://github.com/ceph/ceph-csi/pull/2900
refer: #2900
Signed-off-by: Rakshith R <rar@redhat.com>
this chart currently lack the ability to properly configure encryption,
as well as granting sufficent permission to allow controllers to access
secret when needed.
Signed-off-by: Antoine C <hi@acolombier.dev>
The deploy link in the README is broken.
Fixed more broken links requested by iPraveenParihar in #4958
Signed-off-by: 尤理衡 (Li-Heng Yu) <007seadog@gmail.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>
`reserveSnap()` can potentially fail halfway through, in that case it
needs to undo the snapshot reservation and restore modified attributes
of the snapshot.
Fixes: #4945
Signed-off-by: Niels de Vos <ndevos@ibm.com>