Description of problem: RHEVM-Installer [engine-cleanup] - Not clear error message when engine-cleanup can't dropdb due to an open session [TXT] Version-Release number of selected component (if applicable): RHEVM 3.1 Version Si3 How reproducible: Always Steps to Reproduce: 1. Open DB using pgadmin3 or psql command 2. In another shell open RHEVM, and run engine-cleanup utility. Actual results: Missing right error message to the user which explains why engine-cleanup fails to drop the DataBase. [root@ortal-rhevm3 ovirt-engine]# engine-cleanup WARNING: Executing oVirt Engine cleanup utility. This utility will wipe all existing data including configuration settings, certificates and database. In addition, all existing DB connections will be closed. Would you like to proceed? (yes|no): yes Stopping JBoss Service... [ DONE ] Removing Database... [ ERROR ] Removing CA... [ DONE ] Removing EAR link... [ DONE ] Cleanup finished with errors, please see log file Error: Database drop failed Cleanup log available at /var/log/ovirt-engine/engine-cleanup_2012_05_02_16_27_18.log [root@ortal-rhevm3 ovirt-engine]# less /var/log/ovirt-engine/engine-cleanup_2012_05_02_16_27_18.log [root@ortal-rhevm3 ovirt-engine]# vi /var/log/ovirt-engine/engine-cleanup_2012_05_02_16_27_18.log [root@ortal-rhevm3 ovirt-engine]# vi /var/log/ovirt-engine/engine-cleanup_2012_05_02_16_27_18.log [root@ortal-rhevm3 ovirt-engine]# less /var/log/ovirt-engine/engine-cleanup_2012_05_02_16_27_18.log [root@ortal-rhevm3 ovirt-engine]# engine-cleanup WARNING: Executing oVirt Engine cleanup utility. This utility will wipe all existing data including configuration settings, certificates and database. In addition, all existing DB connections will be closed. Expected results: The error should be printed to the user, and should be taken from the engine-cleanup.log: 2012-05-02 16:27:32::DEBUG::common_utils::323::root:: stderr = 2012-05-02 16:27:32::DEBUG::common_utils::324::root:: retcode = 0 2012-05-02 16:27:32::DEBUG::common_utils::296::root:: Executing command --> '/usr/bin/dropdb -w -U postgres -h 10.35.97.94 -p 6543 engine' 2012-05-02 16:27:37::DEBUG::common_utils::322::root:: output = 2012-05-02 16:27:37::DEBUG::common_utils::323::root:: stderr = dropdb: database removal failed: ERROR: database "engine" is being accessed by other users DETAIL: There are 1 other session(s) using the database.
The fix is uploaded for review: http://gerrit.ovirt.org/4907
Merged upstream; http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=31aa630e4caf0f4d74a845359a229525b78cc913
Merged downstream, https://gerrit.eng.lab.tlv.redhat.com/gitweb?p=ovirt-engine.git;a=commit;h=9360ffd6a3f2d7f92aa090c67aa2c5adef932057