Bug 825998

Summary: RHEVM-Cleanup - Wrong Error print when DB was never installed on the system
Product: Red Hat Enterprise Virtualization Manager Reporter: Ortal <ogvura>
Component: ovirt-engine-setupAssignee: Alex Lourie <alourie>
Status: CLOSED CURRENTRELEASE QA Contact: Yaniv Kaul <ykaul>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: acathrow, alourie, dyasny, iheim, jkt, mgoldboi, Rhev-m-bugs, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: integration
Fixed In Version: si7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 20:01:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ortal 2012-05-29 10:07:39 UTC
Description of problem:

RHEVM-Cleanup - Wrong Error print when DB was never installed on the system

Version-Release number of selected component (if applicable):
RHEVM3.1 Version Si4

How reproducible:
Always

Steps to Reproduce:
1. Run rhevm-setup and reply on ports questions only
2. Click Ctrl+C (or kill the process)

(** In that case DB doesn't exist and was never installed)
  
Actual results:

[root@ortal-rhevm2 ~]# rhevm-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 ]

Error: Couldn't connect to the database server.Check that connection is working and rerun the cleanup utility
Error: Cleanup failed.
please check log at /var/log/ovirt-engine/engine-cleanup_2012_05_29_12_46_46.log
[root@ortal-rhevm2 ~]# less /var/log/ovirt-engine/engine-cleanup_2012_05_29_12_46_46.log


Expected results:

Need to print a relevant error print, such as: DB doesn't exist
instead of: Couldn't connect to the database server

Comment 1 Alex Lourie 2012-06-04 15:00:03 UTC
Fix uploaded for review; http://gerrit.ovirt.org/#/c/5031/

Comment 2 Yaniv Kaul 2012-07-01 14:20:33 UTC
[root@ykaul-rhevm3 si8]# rhevm-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): y

Stopping JBoss service...                                [ DONE ]

Error: Couldn't connect to the database server.Check that connection is working and rerun the cleanup utility
Error: Cleanup failed.
please check log at /var/log/ovirt-engine/engine-cleanup_2012_07_01_17_17_34.log


I don't see a difference between this and the original report - re-opening (SI8)

Comment 3 Alex Lourie 2012-07-01 14:28:43 UTC
Was the cleanup utility in the example above run on the clean system where rhevm was never present?

Comment 4 Yaniv Kaul 2012-07-01 14:40:22 UTC
(In reply to comment #3)
> Was the cleanup utility in the example above run on the clean system where
> rhevm was never present?

No, it was present there before, but I cleaned it, hopefully well (including JBoss and postgres removal).

Comment 5 Yaniv Kaul 2012-07-01 14:48:01 UTC
BTW, please fix missing space after period in "server.Check" (part of "Couldn't connect to the database server.Check that connection" ...)

Comment 6 Yaniv Kaul 2012-07-01 15:04:09 UTC
After removal of ~/.pgpass, the error is correct.
We assume the existence of ~/.pgpass means a DB exists (which is a naive assumption).
Opened another bug - https://bugzilla.redhat.com/show_bug.cgi?id=836807 - asking to remove what we've added to ~/.pgpass 

Moving this one to VERIFIED.