Bug 1031580

Summary: [dbscripts] backup.sh/restore.sh do not work by default
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED NOTABUG QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, iheim, lpeer, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-18 13:31:24 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 Jiri Belka 2013-11-18 10:41:58 UTC
Description of problem:
backup.sh and restore.sh do not work by default (default pg_hba.conf) at all. It is neither intuitive how to solve it nor it is clever to ask me for password.

(Enterprise means being dumb and user friendly by default.)

Customer does not need to be PSQL expert to just execute backup, would he know about PGPASSWORD? But even with PGPASSWORD it does not work for me.

# egrep -v "^#|^[ \t]*$" /var/lib/pgsql/data/pg_hba.conf
local   all         all                               ident
host    engine          engine          0.0.0.0/0               md5
host    engine          engine          ::0/0                   md5
host    all         all         127.0.0.1/32          ident
host    all         all         ::1/128               ident

# export PGPASSWORD=123456
# ./backup.sh -d engine -u engine -v -l /root/ -f backup-`date "+%Y%m%d%H%M"`.sql
Backup of database engine to /root//backup-201311181132.sql started...
pg_dump: [archiver (db)] connection to database "engine" failed: FATAL:  password authentication failed for user "engine"
pg_dump: *** aborted because of error
Backup of database engine failed.

Some more complains:
https://bugzilla.redhat.com/show_bug.cgi?id=976337#c10

Version-Release number of selected component (if applicable):
is23

How reproducible:
100%

Steps to Reproduce:
1. yum install rhevm
2. engine-setup
3. execute ./backup.sh (as above)

Actual results:
impossible

Expected results:
should be clever enough to guide me how to use it or it should ask me for password

Additional info:
using backup.sh and restore.sh should work without any hidden kung-fu. if one would need to change config, type undocumented (in -h output sense) environment variable, then this user could use non-paid upstream as enterprise friendliness of paid product is disputable.

Comment 1 Jiri Belka 2013-11-18 13:31:24 UTC
> But even with PGPASSWORD it does not work for me.

14:25 < alonbl>             self.environment[$
14:25 < alonbl>                 osetupcons.DBEnv.PASSWORD$
14:25 < alonbl>             ] = self._generatePassword()$

Password is random...