rbd-mirror: allow incomplete group demote snapshot to sync after rbd-mirror daemon restart
Currently when the secondary daemon was killed while the group demote snapshot was in incomplete state on secondary,
the promotion state was set to PROMOTION_STATE_ORPHAN upon restart. This state prevents the incomplete
demote snapshot sync after restart as bootstrap on secondary fails. In this commit we fix this by assigning
promotion state to PROMOTION_STATE_NON_PRIMARY for a group with an incomplete non-primary demote snapshot.
The downside is that if the group is removed on the primary cluster, then after restart of
rbd-mirror daemon on secondary cluster, the corresponding group on the secondary also gets removed.
This is because deletion propagation is unconditionally enabled precisely for PROMOTION_STATE_NON_PRIMARY
and this is okay since the user would have deleted the primary demoted group forcefully.
Signed-off-by: VinayBhaskar-V <vvarada@redhat.com>
Resolves: rhbz#
2416554