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