The rook-mon-exit service was causing uncontrolled swact in some
scenarios, such as: BnR, upgrade/downgrade rook-ceph app, and apply
action with swact during action.
To fix it, the rook-mon-exit script was improved to guarantee the pod
check will occur only when the rook-ceph-mon-float deployment exists
and the replica is 1, avoiding the uncontrolled swact when the floating
monitor was turned off for some action. Additionally, a new check to
ensure the rook-ceph is running was implemented, checking the helm
release rook-ceph and rook-ceph-cluster is ready.
Test Plan:
- PASS: Apply the rook-ceph App
- PASS: Swact among controllers and check if the floating monitor will
be scheduled correctly in the active controller
- PASS: Reboot the active controller and check if the floating monitor
will be scheduled correctly in the new active controller
- PASS: Reboot all controllers and check if the floating monitor
will be scheduled correctly in the active controller
- PASS: Turn off all controllers, turn on the controllers in reverse
order and check if the floating monitor will be scheduled
correctly in the active controller
- PASS: Perform Backup and Restore, and check if uncontrolled swacts
was not occurring
- PASS: Upgrade app from an old app version to a new app version
- PASS: Downgrade app from a new app version to an old app version
- PASS: Apply app and cause a proposal uncontrolled swact during the
apply app action
Closes-Bug: 2115438
Change-Id: I9cc2e5d55f389b053a6a29fdbe3ce2337d8871da
Signed-off-by: Gustavo Ornaghi Antunes <gustavo.ornaghiantunes@windriver.com>