Created attachment 601212 [details] failedrestore the DB Description of problem: Failed to restore engine db during setup, when running engine-setup while engine db already exists Exception: Failed to rename DB 'engine' to 'engine_2012_07_29_14_30_37'. Check that there are no active connections and try again. Version-Release number of selected component (if applicable): 3.1/si12 How reproducible: always Steps to Reproduce: 1.install rhevm 2.run engine-setup 3.Rerun engine-setup Actual results: The engine tried to upgrade the DB (and actually, It went fine) however, the execution of engine-config afterwards failed, and setup tried to restore the DB. the DB restore failed since setup didn't dropped the DB before (probably it thinks that the db was renamed). Exception: Failed to rename DB 'engine' to 'engine_2012_07_29_14_30_37'. Check that there are no active connections and try again. Expected results: Additional info:
http://gerrit.ovirt.org/#/c/6759/1
Fixed, SI13 Remote DB setup was able to upgrade Engine DB Fixed, SI13
David, The issue (as described in the topic) is not the upgrade of rempote DB. You should check what happens when the remote DB upgrade fails, and if engine-upgrade is able to restore the old DB.
Ok Ofer, Retested on SI13.1-> Fixed, On remote Setup I did-> 1) I have moved the engine-config from /usr/share/ovirt-engine/engine-config/engine-config to /tmp 2) I have ran rhevm-setup in order for the upgrade engine db to fail and to restore the previous engine db successfully. 3) As expected rhevm-setup fails, and engine db is restored and can be accessed via pgadmin The creation date is as expected ->2 days ago (Seen in dwh_history_timekeeping) ============================== 2012-08-07 11:46:48::DEBUG::common_utils::690::root:: DB Restore completed successfully 2012-08-07 11:46:48::DEBUG::setup_sequences::62::root:: Traceback (most recent call last): File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run function() File "/usr/bin/rhevm-setup", line 1060, in _upgradeDB raise Exception(output_messages.ERR_DB_UPGRADE_FAILED) Exception: Database upgrade failed. Previous database has been restored