Bug 1015130

Summary: taskcleaner.sh - psql: fe_sendauth: no password supplied
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: aberezin, acathrow, emesika, iheim, lpeer, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-07 11:23:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jiri Belka 2013-10-03 13:39:47 UTC
Description of problem:
3.3 does not ship .pgpass anymore thus it seems it impacts taskcleaner.sh

# /usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh -zRCJAv
psql: fe_sendauth: no password supplied

# tail -n4 /usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh | head -n1
psql -w -U ${USERNAME} -h ${SERVERNAME} -p ${PORT} -c "${CMD1}${CMD2}" -x ${DATABASE}

# psql --help | grep '\-w'
  -w, --no-password        never prompt for password

# psql -w -U engine -h localhost -p 5432 -c "select * from vms;" -x engine
psql: fe_sendauth: no password supplied

# ls -l /etc/ovirt-engine/.pgpass /var/lib/pgsql/.pgpass
ls: cannot access /etc/ovirt-engine/.pgpass: No such file or directory
ls: cannot access /var/lib/pgsql/.pgpass: No such file or directory

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

How reproducible:
100%

Steps to Reproduce:
1. try to use taskcleaner.sh
2.
3.

Actual results:
wants password but never asks for it

Expected results:
either ask or take it from somewhere (the password)

Additional info:

Comment 1 Eli Mesika 2013-10-07 11:23:24 UTC
1) it is recommened to use this utility by running engine-setup since the engine must be stopped prior to that. (so, basically , this utility should not be run manually)

2) If you just want to test that and you had stopped manually the engine you must use :

PGPASSWORD=password /usr/share/ovirt-engine/setup/dbutils/taskcleaner.sh -zRCJAv

Comment 2 Arthur Berezin 2013-10-07 11:51:31 UTC
We should change output of taskcleaner.sh so it would ask to set an PGPASSWORD variable

Comment 3 Eli Mesika 2013-10-07 13:09:05 UTC
(In reply to Arthur Berezin from comment #2)
> We should change output of taskcleaner.sh so it would ask to set an
> PGPASSWORD variable

This behaviour is not specific to task cleaner , its a PG option that is used by all DB utils.