From: Ilya Dryomov Date: Fri, 22 Jul 2022 13:23:57 +0000 (+0200) Subject: librbd: tweak misleading "image is still primary" error message X-Git-Tag: v18.0.0~437^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=95dd89b4d771a8e01ce52beecc701548bf8321e8;p=ceph.git 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 --- 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; }