]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: tweak misleading "image is still primary" error message 47242/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 22 Jul 2022 13:23:57 +0000 (15:23 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 22 Jul 2022 14:21:49 +0000 (16:21 +0200)
m_promotion_state == PROMOTION_STATE_NON_PRIMARY doesn't say anything
about the remote image.  It could still be primary but it could also be
demoted.

Fixes: https://tracker.ceph.com/issues/56676
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/mirror/PromoteRequest.cc

index b7ae9366e20e4f073fdea0f6ce3505c4705eced1..b119e4edcd95b3d761ea738743d173d66602b018 100644 (file)
@@ -59,7 +59,8 @@ void PromoteRequest<I>::handle_get_info(int r) {
     finish(-EINVAL);
     return;
   } else if (m_promotion_state == PROMOTION_STATE_NON_PRIMARY && !m_force) {
-    lderr(cct) << "image is still primary within a remote cluster" << dendl;
+    lderr(cct) << "image is primary within a remote cluster or demotion is not propagated yet"
+               << dendl;
     finish(-EBUSY);
     return;
   }