With the earlier version disabling a primary group with promotion state PROMOTION_STATE_UNKNOWN
requires a force flag which deviates from the existing behavior of standalone images.
This change aligns group disable behavior with that of standalone images by allowing primary
groups in PROMOTION_STATE_UNKNOWN state to be disabled without the force flag.
Signed-off-by: VinayBhaskar-V <vvarada@redhat.com>
Resolves: rhbz#
2396582
return r;
}
- if (promotion_state != mirror::PROMOTION_STATE_PRIMARY && !force) {
+ bool is_primary = (promotion_state == mirror::PROMOTION_STATE_PRIMARY ||
+ promotion_state == mirror::PROMOTION_STATE_UNKNOWN);
+
+ if (!is_primary && !force) {
lderr(cct) << "mirrored group " << group_name
<< " is not primary, add force option to disable mirroring"
<< dendl;