rbd: add minsnapshotsonimage flag

An rbd image can have a maximum number of
snapshots defined by maxsnapshotsonimage
On the limit is reached the cephcsi will
start flattening the older snapshots and
returns the ABORT error message, The Request
comes after this as to wait till all the
images are flattened (this will increase the
PVC creation time.  Instead of waiting till
the maximum snapshots on an RBD image, we can
have a soft limit, once the limit reached
cephcsi will start flattening the task to
break the chain. With this PVC  creation time
will only be affected when the hard limit
(minsnapshotsonimage) reached.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2020-11-17 09:04:29 +05:30
committed by mergify[bot]
parent 880b5bb427
commit 8d3a44d0c4
7 changed files with 44 additions and 8 deletions

View File

@ -107,6 +107,11 @@ type Config struct {
// on rbd image without flattening, once the limit is reached cephcsi will
// start flattening the older rbd images to allow more snapshots
MaxSnapshotsOnImage uint
// MinSnapshotsOnImage represents the soft limit for maximum number of
// snapshots allowed on rbd image without flattening, once the soft limit is
// reached cephcsi will start flattening the older rbd images.
MinSnapshotsOnImage uint
}
// ValidateDriverName validates the driver name.