Commit Graph

3 Commits

Author SHA1 Message Date
Niels de Vos a9ce294dbb rbd: let CloneImageByID check for rbd_clone4 at runtime
Some versions of librbd provide the rbd_clone4 function, and others do
not. Squid will have the function backported in the 1st update, the
initial release of Squid does not have it. This makes checking for the
function based on the named Ceph version impractical.

With the new dlsym.LookupSymbol() function, it is now possible to check
the availability of rbd_clone4 during runtime. If the symbol is not
found ErrNotImplemented is returned, which can be used to detect the
unavailability of the function.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-25 12:03:15 +00:00
Niels de Vos 8bced26404 rbd: fix cleanup of CloneFromGroupSnap test case
When there is a failure during the CloneFromGroupSnap test case, the
rbd-group snapshot was not removed, preventing images from being deleted
as well.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-07-25 12:03:15 +00:00
Niels de Vos ee25db94c6 rbd: add support for CloneImageByID()
RBD image groups can be used to create consistent snapshots of all
images that are part of the group. The new rbd_clone4() API makes it
possible to create a new RBD image from a single snapshot that was
created as part of the group snapshot.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-06-25 20:40:23 +00:00