Bug 818230 - RHEVM-Installer [engine-cleanup] - Not clear error message when engine-cleanup can't dropdb due to an open session [TXT]
Summary: RHEVM-Installer [engine-cleanup] - Not clear error message when engine-cleanu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.1.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Alex Lourie
QA Contact: Pavel Stehlik
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-02 13:59 UTC by Ortal
Modified: 2012-12-04 20:00 UTC (History)
8 users (show)

Fixed In Version: si15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 20:00:46 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ortal 2012-05-02 13:59:59 UTC
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 14:14:06 UTC
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.