]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librbd: allow group remove when group mirroring isn't supported
authorIlya Dryomov <idryomov@gmail.com>
Mon, 16 Jun 2025 20:46:38 +0000 (22:46 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 28 Sep 2025 18:25:05 +0000 (20:25 +0200)
Ignore a potential EOPNOTSUPP error from Mirror::group_disable() in
Group::remove() -- this would come up if the client side (including rbd
CLI) is upgraded before the OSDs.  The same is done for standalone
images in RemoveRequest::handle_disable_mirror().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/api/Group.cc

index 1eb36cac39a8256829e1fe586072065ff86ce584..02ecc66a521ba54339769f4342df9e79d54c629e 100644 (file)
@@ -378,7 +378,7 @@ int Group<I>::remove(librados::IoCtx& io_ctx, const char *group_name)
   }
 
   r = Mirror<I>::group_disable(io_ctx, group_name, false);
-  if (r < 0) {
+  if (r < 0 && r != -EOPNOTSUPP) {
     lderr(cct) << "failed to disable mirroring: " << cpp_strerror(r) << dendl;
     return r;
   }