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: v17.2.4~152^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F47248%2Fhead;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 (cherry picked from commit 95dd89b4d771a8e01ce52beecc701548bf8321e8) --- diff --git a/src/librbd/mirror/PromoteRequest.cc b/src/librbd/mirror/PromoteRequest.cc index b7ae9366e20e..b119e4edcd95 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; }