Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1118191

Summary: unlock_entity.sh fails with "psql: fe_sendauth: no password supplied"
Product: Red Hat Enterprise Virtualization Manager Reporter: Nir Soffer <nsoffer>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED ERRATA QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: amureini, bazulay, gklein, iheim, lpeer, nsoffer, oourfali, pstehlik, rbalakri, Rhev-m-bugs, sherold, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: ovirt-3.5.0_rc1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 18:05:38 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1142923, 1156165    

Description Nir Soffer 2014-07-10 07:43:51 UTC
Description of problem:

unlock_entity.sh fail to connect to the database:

[root@nott04 /]# /usr/share/ovirt-engine/dbscripts/unlock_entity.sh -t disk -q
psql: fe_sendauth: no password supplied

This tool does not contain a password option and does not ask for
password.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Manager Version: 3.4.1-0.23.el6ev

How reproducible:
Always

Steps to Reproduce:
1. Run script as root or as postgres

Workaround:
modify the database manually.

Comment 1 Oved Ourfali 2014-07-10 11:58:18 UTC
Eli - please have a look at it

Comment 2 Eli Mesika 2014-07-20 09:32:27 UTC
Please attach /var/lib/pgsql/data/pg_hba.conf

Comment 3 Nir Soffer 2014-07-20 11:42:12 UTC
(In reply to Eli Mesika from comment #2)
> Please attach /var/lib/pgsql/data/pg_hba.conf

You can find the file on root@nott04.

Comment 6 Eli Mesika 2014-07-22 10:26:10 UTC
The DB was configured in pg_hba.conf with md5
This means that in order to run this utility properly you should set the  PGPASSWORD or  PGPASSFILE environment variable.

Example:

>PGPASSWORD=xxxxxx ./unlock_entity.sh -u engine -t disk -q

I had added this information to the utility help

Comment 7 Petr Beňas 2014-08-28 09:17:07 UTC
-bash-4.1# rpm -qa ovirt-engine-dbscripts
ovirt-engine-dbscripts-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch
-bash-4.1# /usr/share/ovirt-engine/dbscripts/unlock_entity.sh -t disk -q
psql: fe_sendauth: no password supplied
FATAL: Cannot execute sql command: --command=
                        select
                                vm_id as entity_id,
                                disk_id
                        from
                                base_disks a,
                                images b,
                                vm_device c
                        where
                                a.disk_id = b.image_group_id and
                                b.image_group_id = c.device_id and
                                imagestatus = 2 and
                                is_plugged;

Comment 8 Eli Mesika 2014-08-28 09:31:53 UTC
You didn't verified as explained in comment 6

please verify again with

PGPASSWORD=xxxxxx /usr/share/ovirt-engine/dbscripts/unlock_entity.sh -t disk -q

Comment 9 Petr Beňas 2014-08-28 09:37:04 UTC
Sorry, I've missed the comment 6.
Verified in ovirt-engine-dbscripts-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch

Comment 12 errata-xmlrpc 2015-02-11 18:05:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0158.html