]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/api: propagate ENOENT error in Mirror::group_get_info() API
authorRamana Raja <rraja@redhat.com>
Tue, 15 Apr 2025 19:16:34 +0000 (15:16 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 28 Sep 2025 18:25:04 +0000 (20:25 +0200)
commit4bb600770f021c42fce0fa7f2e579e089563e15d
treed1538dbff834f0a09dbb4a4d7c90a6a48911647f
parentdb2ea62dc44de23c9b77449c27e0528271b83400
librbd/api: propagate ENOENT error in Mirror::group_get_info() API

The ENOENT error was ignored by the librbd API that retrieves mirror
group information. This manifests as a bug in the mirror group
snapshot scheduler, where the scheduler utilized this API to prevent
scheduler commands on groups that are not enabled for snapshot-based
mirroring. Since the librbd API masked the ENOENT error, the
scheduler's check for mirror group mode was compromised, resulting
in scheduler commands unexpectedly succeeding on groups that were not
enabled for snapshot-based mirroring. Therefore, allow the ENOENT error
from the API that retrieves mirror group information to surface. This
fixes the spurious mirror group mode check in the mirror snapshot
scheduler. Additionally, add a test to ensure that group snapshot
schedule commands fail on a group not enabled for mirroring.

Signed-off-by: Ramana Raja <rraja@redhat.com>
qa/workunits/rbd/cli_generic.sh
src/librbd/api/Mirror.cc