Bug #22228
closedIf upgrade errors, a message to re-run upgrade manually is printed
Description
From Bugzilla:
Description of problem:
If you run foreman-maintain to upgrade a system and the "satellite-installer --upgrade" portion fails, you will be sent back to a shell prompt with instructions to re-run "satellite-installer --upgrade". If you do this, it may work, but the system is still in maintenance mode.
Instead, if the sat-installer command fails, it should print the usual output but also print output telling the user to re-run foreman-maintain. Otherwise, the user is left in maintenance mode and it looks like the upgrade failed when they try to access Satellite in the browser.
Updated by Amit Upadhye over 6 years ago
- Assignee changed from Anurag Patel to Amit Upadhye
Updated by Amit Upadhye over 6 years ago
Anurag Patel wrote:
From Bugzilla:
Description of problem:
If you run foreman-maintain to upgrade a system and the "satellite-installer --upgrade" portion fails, you will be sent back to a shell prompt with instructions to re-run "satellite-installer --upgrade". If you do this, it may work, but the system is still in maintenance mode.
Instead, if the sat-installer command fails, it should print the usual output but also print output telling the user to re-run foreman-maintain. Otherwise, the user is left in maintenance mode and it looks like the upgrade failed when they try to access Satellite in the browser.
Here foreman-maintain is handing over control to 'satellite-installer', I discussed with Kavita and as per that I think handling this with exception in foreman-maintain should be good approach. We are thinking to catch all exceptions and print that on terminal with message of re-running foreman-maintain. If there are any more thoughts on this one then those are welcome.
Updated by Amit Upadhye over 6 years ago
Amit Upadhye wrote:
Anurag Patel wrote:
From Bugzilla:
Description of problem:
If you run foreman-maintain to upgrade a system and the "satellite-installer --upgrade" portion fails, you will be sent back to a shell prompt with instructions to re-run "satellite-installer --upgrade". If you do this, it may work, but the system is still in maintenance mode.
Instead, if the sat-installer command fails, it should print the usual output but also print output telling the user to re-run foreman-maintain. Otherwise, the user is left in maintenance mode and it looks like the upgrade failed when they try to access Satellite in the browser.
Here foreman-maintain is handing over control to 'satellite-installer', I discussed with Kavita and as per that I think handling this with exception in foreman-maintain should be good approach. We are thinking to catch all exceptions and print that on terminal with message of re-running foreman-maintain. If there are any more thoughts on this one then those are welcome.
Adding more details as per discussion with Kavita and as per my understanding of this. If we see implementation then we have run method in /definitions/procedures/installer/upgrade.rb which calls execute! method for actually do heavy lifting of satellite-installer, katello-installer and foreman-installer.
To avoid messages of this specific installers as per versions of Satellite and as per upstream we are thinking to wrap execute! method call in exception and then remove installer specific message and append foreman-maintain message there.