Commit Graph

7 Commits

Author SHA1 Message Date
Niels de Vos
f2bc1c674b rbd: replace Manager.DeleteVolumeGroup() by VolumeGroup.Delete()
There is no need for the `Manager.DeleteVolumeGroup()` function as
`VolumeGroup.Delete()` should cover everything too.

By moving the `.Delete()` functionality of removing the group from the
journal to the shared `commonVolumeGroup` type, a volume group snaphot
can use it as well.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-09-26 13:59:21 +00:00
Madhu Rajanna
a243cf52d4 rbd: return more descriptive error
updated GetVolumeByID to return more
descriptive error so that caller no
need to add more details in
the error message.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-07-31 12:16:42 +00:00
Niels de Vos
74d434c3b7 rbd: check for valid UUID instead of name
It seems to be possible that the UUID was found, but the name is not
set. Checking on UUID makes the CreateVolumeGroup operation more
idempotent.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-25 12:18:24 +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
d248a1e200 rbd: add Manager interface for using Volumes and VolumeGroups
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-11 11:17:13 +00:00