Commit Graph

7 Commits

Author SHA1 Message Date
Niels de Vos
689498e66a rbd: move common functions for VolumeGroup structs into own type
Many functions that are implemented for the volumeGroup type can be
shared with the (coming) volumeGroupSnapshot type. Move these functions
into a commonVolumeGroup type, so that volumeGroup and
volumeGroupSnapshot can inherit them.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-08-28 11:46:29 +00:00
Madhu Rajanna
f7c78ae4fe rbd: update group Stringer method
updated the group stringer method
to have pool and namespace for
proper debugging/logging and to
use it with CLI as agrument as well.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-07-31 12:16:42 +00:00
Niels de Vos
f9ab14e826 rbd: check if an image is part of a group before adding it
A RBD image can only be part of a single group. While an image is added
to a group, check if the image is already part of a group, and return an
error in case it is.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-24 15:55:07 +00:00
Niels de Vos
4acffb5548 rbd: make VolumeGroup Create/Delete/AddVolume/RemoveVolume idempotent
Add extra error checking to make sure trying to create an existing
volume group does not result in a failure. The same counts for deleting
a non-existing volume group, and adding/removing volumes to/from the
volume group.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-24 15:55:07 +00:00
Niels de Vos
382d70893d rbd: remove the VolumeGroup from the journal on DeleteVolumeGroup
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-24 15:55:07 +00:00
Niels de Vos
a82ae15f1a rbd: use the Manager to handle CSI-Addons VolumeGroup requests
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-24 15:55:07 +00:00
Niels de Vos
40b0526f64 rbd: implement the VolumeGroup interface
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-24 15:55:07 +00:00