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.
Eli - please have a look at it
Please attach /var/lib/pgsql/data/pg_hba.conf
(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.
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
-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;
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
Sorry, I've missed the comment 6. Verified in ovirt-engine-dbscripts-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch
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