Bug 818230 - RHEVM-Installer [engine-cleanup] - Not clear error message when engine-cleanup can't dropdb due to an open session [TXT]
RHEVM-Installer [engine-cleanup] - Not clear error message when engine-cleanu...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
3.1.0
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Alex Lourie
Pavel Stehlik
integration
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-02 09:59 EDT by Ortal
Modified: 2012-12-04 15:00 EST (History)
8 users (show)

See Also:
Fixed In Version: si15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:00:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ortal 2012-05-02 09:59:59 EDT
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.
Comment 1 Alex Lourie 2012-05-30 10:14:06 EDT
The fix is uploaded for review:
http://gerrit.ovirt.org/4907

Note You need to log in before you can comment on or make changes to this bug.