Hi,

Which version of the engine are you using?

On Tue, Oct 20, 2020 at 4:59 PM <kushagra2agar...@gmail.com> wrote:
>
> I am unable to connect to postgres database running on oVirt engine and while 
> troubleshooting found below possible issue.

How do you try to connect?

>
> semanage fcontext -a -t postgresql_exec_t 
> /opt/rh/rh-postgresql10/root/usr/bin/psql
> ValueError: File spec /opt/rh/rh-postgresql10/root/usr/bin/psql conflicts 
> with equivalency rule '/opt/rh/rh-postgresql10/root /'; Try adding 
> '//usr/bin/psql' instead

Why do you think psql needs postgresql_exec_t type?

On my test engine, I have:

$ ls -lZ /opt/rh/rh-postgresql10/root/usr/bin/psql
-rwxr-xr-x. root root system_u:object_r:bin_t:s0
/opt/rh/rh-postgresql10/root/usr/bin/psql

and everything works well. psql is not the PG server/daemon - it's
just a user utility, it does not need access to PG data or anything
like that.

BTW, there is a utility script for running psql against the engine DB,
working in every version (since it was introduced) - e.g.:

/usr/share/ovirt-engine/dbscripts/engine-psql.sh -c 'select * from vms'

Generally speaking, you should not need to modify the DB.

Best regards,
-- 
Didi
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/CXWJQ6LASZOJJ2JLCDD3O22BXSAQFU2W/

Reply via email to