Bug 825998 - RHEVM-Cleanup - Wrong Error print when DB was never installed on the system
Summary: RHEVM-Cleanup - Wrong Error print when DB was never installed on the system
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: Yaniv Kaul
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-29 10:07 UTC by Ortal
Modified: 2015-09-22 13:10 UTC (History)
8 users (show)

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


Attachments (Terms of Use)

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.


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