Bug #22220
closedTurn off maintenance mode if upgrade run failed
Description
From Bugzilla:
Description of problem: While running foreman-maintain upgrade run, if upgrade failed in repository setup, firewall set in maintenance mode should turn off.
Version-Release number of selected component (if applicable): Foreman-maintain snap 2.0
How reproducible: always
Steps to Reproduce:
1. Run #foreman-maintain upgrade run --target-version 6.3 without setting up repositories
Actual results:
Upgrade run will fail due to Error: 'rhel-7-server-satellite-6.3-rpms' does not match a valid repository ID and can not access satellite as maintenance mode on.
Expected results:
Maintenance mode should turn off if upgrade run failed.
Additional info:
Updated by Kavita Gaikwad almost 6 years ago
Instead of turning off maintenance mode when upgrade run failed, it is better to leave the satellite/foreman in maintenance mode.
For user visibility, we can show a message saying that satellite/foreman continues to be in maintenance mode and add a command which will turn off maintenance mode in the same message.