Bug 879920

Summary: [rhevm-upgrade] [TEXT] when upgrade is failing, there is no link to documentation (KB) on how to manually roll-back
Product: Red Hat Enterprise Virtualization Manager Reporter: Haim <hateya>
Component: ovirt-engine-setupAssignee: Moran Goldboim <mgoldboi>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: bazulay, dyasny, iheim, mkenneth, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: si24.5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 880664 (view as bug list) Environment:
Last Closed: 2012-12-13 10:43:57 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 880664    

Description Haim 2012-11-25 08:03:38 EST
Description of problem:

when upgrade is failing in a critical point whereas it can't automatically roll-back, a link to proper documentation should be prompted on how\what steps should be performed.
such knowledge does exists in upgrade scripts code, thus, it wasn't prompted in any kind (due to exception i guess).

MSG_ERROR_UPGRADE_30 = "\n **Error: Upgrade failed **\n\
In order to restore the previous installation, perform the following steps: \n\
1. Make sure that there are no EAP6 packages on the system:\n\
\trpm -qa | grep ep6\.el6\n\
If there are such packages, remove them:\n\
\tyum remove `rpm -qa | grep ep6\.el6`\n\
2. Make sure that rhevm or its dependencies are not installed:\n\
\trpm -qa | grep rhevm \n\
If they are still installed, remove them:\n\
\tyum remove `rpm -qa | grep rhevm`\n\
3. Disable EAP6 channel, otherwise you will experience dependency resolution problems.\n\
4. Install rhevm-3.0 from the RHEL channel. For example, use the following command:\n\
\tyum install %s\n\
5. Rename DB if it is present:\n\
\tpsql -U postgres --list\n\
If 'rhevm' DB exists, rename it:\n\
\tpsql -U postgres -c \"ALTER DATABASE rhevm RENAME TO rhevm_old;\"\n\
6. Run rhevm-setup using the answer file located at " + basedefs30.ANSWER_FILE + ":\n\
\trhevm-setup --answer-file=" + basedefs30.ANSWER_FILE + "\n\
7. Remove the DB created by the setup:\n\
\tservice jbossas stop\n\
\tdropdb -U postgres rhevm\n\
8. Restore the production DB using the backup file by running the following commands: \n\
\tpsql -U postgres -f %s \n\
\tpsql -U postgres -c \"ALTER DATABASE engine RENAME TO rhevm;\"\n\
9. Restore security certificates and configs using the following command: \n\
\ttar jxvfP " + basedefs30.OLD_VERSION_FILES + " \n\
10. Start jboss service using the following command: \n\
\tservice jbossas start\n"
Comment 2 Haim 2012-11-25 13:16:38 EST
reducing severity as its get printed into the logs, not to user output and there is no formalized link to a KB on the web.
Comment 3 Moran Goldboim 2012-11-26 05:20:18 EST
we would like to have a KB article on rollback of 3.0->3.1 failed upgrade
Comment 7 Simon Grinberg 2012-11-27 06:05:33 EST
Link provided by Chris N. : 

"I created a place holder for a tech brief covering the topics you
describe above. Please check the description I've written on this place
holder article and let me know if the description covers what you were
looking for:

https://access.redhat.com/knowledge/articles/269333

I can get started on this right away."
Comment 13 Moran Goldboim 2012-12-11 11:57:36 EST
*** Bug 879936 has been marked as a duplicate of this bug. ***
Comment 14 Moran Goldboim 2012-12-11 12:49:04 EST
*** Bug 879935 has been marked as a duplicate of this bug. ***