Bug 1488559 - Incomplete procedure in "Allowing Read-Only Access to the History Database"
Summary: Incomplete procedure in "Allowing Read-Only Access to the History Database"
Keywords:
Status: CLOSED DUPLICATE of bug 1488178
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: Documentation
Version: 4.1.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: rhev-docs@redhat.com
QA Contact: rhev-docs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-05 17:00 UTC by Andrea Perotti
Modified: 2019-05-07 12:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-05 17:02:17 UTC
oVirt Team: Docs
Target Upstream Version:


Attachments (Terms of Use)

Description Andrea Perotti 2017-09-05 17:00:07 UTC
Description of problem:
The procedure described in "https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/data_warehouse_guide/allowing_read_only_access_to_the_history_database" is incomplete and do not allow the user to effectively connect to the database

How reproducible:
Always

Steps to Reproduce:
1. Follow step by step the guide

Actual results:
User try to connect to the db using the new [user name] created, and get the error:

-bash-4.2$ psql -U [user name] ovirt_engine_history
psql: FATAL:  Peer authentication failed for user "tudwhro"

Expected results:
Being able to connect

Additional info:

The missing parts in the document are 2:
a) 
For the new user to be able to access the DB you still need to configure the authentication method in the pg_hba.conf file:

/var/lib/pgsql/data/pg_hba.conf
~~~
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
host    ovirt_engine_history ovirt_engine_history 0.0.0.0/0               md5
host    ovirt_engine_history ovirt_engine_history ::0/0                   md5
host    ovirt_engine_history $RO_USER 0.0.0.0/0               md5
host    ovirt_engine_history $RO_USER ::0/0                   md5
host    engine          engine          0.0.0.0/0               md5
host    engine          engine          ::0/0                   md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            ident
# IPv6 local connections:
host    all             all             ::1/128                 ident
~~~

Replace $RO_USER with the corresponding name, reload postgresql service (systemctl reload postgresql),

b) show an example of communication string, specifying that also from the manager will be requested to express the host variable.

To query the DB do always express via the -h flag the host variable as localhost for the md5 method to be discovered while accessing the DB

    # psql -h localhost -U $RO_USER ovirt_engine_history

Comment 1 Andrea Perotti 2017-09-05 17:02:17 UTC

*** This bug has been marked as a duplicate of bug 1488178 ***


Note You need to log in before you can comment on or make changes to this bug.