]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: tweak misleading "image is still primary" error message 47248/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 22 Jul 2022 13:23:57 +0000 (15:23 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 1 Aug 2022 15:19:03 +0000 (17:19 +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>
(cherry picked from commit 95dd89b4d771a8e01ce52beecc701548bf8321e8)

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;
   }