forked from rook/rook
Mon failover reliability is improved in two scenarios with these changes. First, if the failover is aborted because of failing to start the new mon and wait for it to join quorum, the new mon will be fully removed and the failover rolled back. Previously, the operator would leave the new mon pod running even if it never joined quorum. Now the timeout for the failover is increased to wait longer for the new mon, but if it times out, there are no leftovers from the cancelled failover. Second, if the operator is failed in the middle of a failover before the old mon is removed, the operator needs to remove an extra mon. The operator was only selecting a random mon for removal instead of honoring the stretch cluster topology or looking for mons on the same node that could be removed to restore the correct desired number of mons. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>