Skip to content

Commit

Permalink
librbd: tweak misleading "image is still primary" error message
Browse files Browse the repository at this point in the history
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.  Report the status of the local image instead.

Fixes: https://tracker.ceph.com/issues/56676
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
idryomov committed Jul 22, 2022
1 parent aea6200 commit 465b06a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librbd/mirror/PromoteRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 non-primary, remote demotion is not propagated yet"
<< dendl;
finish(-EBUSY);
return;
}
Expand Down

0 comments on commit 465b06a

Please sign in to comment.