From 77affe15d485312e7e12ac6a3d5c3318c90e3bc9 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Fri, 22 Jul 2022 15:23:57 +0200 Subject: [PATCH] librbd: tweak misleading "image is still primary" error message 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 (cherry picked from commit 95dd89b4d771a8e01ce52beecc701548bf8321e8) --- src/librbd/mirror/PromoteRequest.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librbd/mirror/PromoteRequest.cc b/src/librbd/mirror/PromoteRequest.cc index b7ae9366e20e4..b119e4edcd95b 100644 --- a/src/librbd/mirror/PromoteRequest.cc +++ b/src/librbd/mirror/PromoteRequest.cc @@ -59,7 +59,8 @@ void PromoteRequest::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; } -- 2.39.5