]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: disallow group snap rollback if memberships don't match
authorIlya Dryomov <idryomov@gmail.com>
Fri, 14 Jun 2024 12:04:39 +0000 (14:04 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 16 Jun 2024 22:16:14 +0000 (00:16 +0200)
commitf212a9ca5b9238b80ae5c728a7bf99366ed910a1
tree8701ad68bf3416b78246b3b4c25be337e4ad961b
parent91a06323549c3c68aa56e79fec21d6a7dcb62cc9
librbd: disallow group snap rollback if memberships don't match

Before proceeding with group rollback, ensure that the set of images
that took part in the group snapshot matches the set of images that are
currently part of the group.  Otherwise, because we preserve affected
snapshots when an image is removed from the group, data loss can ensue
where an image gets rolled back while part of another group or not part
of any group but long repurposed for something else.

Similarly, ensure that the group snapshot is complete.

Fixes: https://tracker.ceph.com/issues/66300
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/cls/rbd/cls_rbd_types.h
src/librbd/api/Group.cc
src/test/pybind/test_rbd.py