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

Bug 1079903

Summary: rhevm-dwh-setup fails if pg_hba.conf is manually modified
Product: Red Hat Enterprise Virtualization Manager Reporter: Yedidyah Bar David <didi>
Component: ovirt-engine-dwhAssignee: Yedidyah Bar David <didi>
Status: CLOSED ERRATA QA Contact: Barak Dagan <bdagan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: aberezin, acathrow, didi, gklein, iheim, jbiddle, lbopf, pstehlik, Rhev-m-bugs, sbonazzo, yeylon, ylavi
Target Milestone: ---Keywords: ZStream
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In versions previous to 3.4, the rhevm-dwh-setup command would fail under certain conditions if the pg_hba.conf file had been manually edited prior to running that command. This was caused by the setup process checking the exact number of spaces in between values on the line corresponding to 'local'. Now, the logic for checking the values in that line has been revised so that the setup process can correctly read all values regardless of the number of spaces. *Note: This bug does not occur in 3.4 with the OTOPI setup.
Story Points: ---
Clone Of:
: 1084760 (view as bug list) Environment:
Last Closed: 2014-06-09 15:18:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1084760, 1085364    
Attachments:
Description Flags
setup log + hba file none

Description Yedidyah Bar David 2014-03-24 09:30:33 UTC
Description of problem:

See report in http://lists.ovirt.org/pipermail/users/2014-March/022541.html .

Suggested solution was to manually fix the first 'local' line.

The reporter did not provide the "bad" pg_hba file.

Code analysis shows that we rely on having the exact amount of spaces as is default - if a user edits the file and changes the amount of spaces in the first 'local' line, setup will fail to parse it.

This code was rewritten for 3.4, which should not be affected.

Comment 2 Yedidyah Bar David 2014-03-24 13:00:12 UTC
Details:

Current code expects the exact following line in pg_hba.conf:

local   all         all                               md5

If it finds it (supposedly left over from a previous 3.2 setup), it changes the last word to 'ident', to allow connecting as user 'postgres' without a password.

If this line is not found, we do not change the file, and if the first 'local' line does use 'md5', connecting as postgres will still ask for a password and setup will fail.

We should be able to find this line even if the number of spaces between fields was changed, e.g. manually by a user.

Comment 3 Yaniv Lavi 2014-03-24 16:13:37 UTC
We need to decide if to fix this issue in zstream 3.3 only, not a issue with 3.4.
Please read and let us know what you think.



Yaniv

Comment 4 Arthur Berezin 2014-03-24 18:32:40 UTC
Yaniv, what's changed in 3.4 that makes this not impact 3.4?

Comment 5 Yaniv Lavi 2014-03-25 03:31:58 UTC
(In reply to Arthur Berezin from comment #4)
> Yaniv, what's changed in 3.4 that makes this not impact 3.4?
We moved to otopi setup that doesn't have this bug.

Comment 6 Arthur Berezin 2014-03-25 08:57:45 UTC
(In reply to Yaniv Dary from comment #5)
> (In reply to Arthur Berezin from comment #4)
> > Yaniv, what's changed in 3.4 that makes this not impact 3.4?
> We moved to otopi setup that doesn't have this bug.

Thanks Yaniv, so yes, 3.3.z only.

Comment 7 Yaniv Lavi 2014-04-03 09:55:19 UTC
readding 3.4.0, since we want to test this even if no fix is required.



Yaniv

Comment 9 Yaniv Lavi 2014-04-06 11:55:09 UTC
Should be fixed in otopi setup, please test.



Yaniv

Comment 10 Barak Dagan 2014-04-09 19:21:36 UTC
Verification fails on av6.1:


rhevm-3.4.0-0.13.beta3.el6ev.noarch
rhevm-dwh-3.4.0-6.el6ev.noarch
rhevm-reports-3.3.2-3.el6ev.noarch
jasperreports-server-pro-5.5.0-6.el6ev.noarch


# "local" is for Unix domain socket connections only
local    all          all                                md5
host    rhevmreports    engine_reports  0.0.0.0/0               md5

changed ident to md5 i 1st raw and added an extra space between each pair.

installation stick at:

[ INFO  ] Backing up database localhost:ovirt_engine_history to '/var/lib/ovirt-engine-dwh/backups/dwh-20140410000818.cKMbZE.sql'.
[ INFO  ] Creating/refreshing DWH database schema

Comment 11 Barak Dagan 2014-04-09 19:22:33 UTC
Created attachment 884621 [details]
setup log + hba file

Comment 12 Barak Dagan 2014-04-28 10:32:31 UTC
Anpther try on the same VM, with the same env, managed to pass.

Comment 13 Yedidyah Bar David 2014-05-21 06:25:05 UTC
Not sure what's the exact policy regarding what is or isn't in the release notes and requires (or not) doc_text. I personally think that any bug that was fixed in version X.Y.Z, for whatever value of Z, should not appear again in X.(Y+1).0 .

I expect 3.3.3 to be released before 3.4.0, therefore do not see a need for doc text on this one, as bug #1084760 (z-stream clone) will be in 3.3.3.

Comment 14 Lucy Bopf 2014-05-22 00:43:12 UTC
Hi Yedidyah,

We have had several like this come up in the errata queues for 3.4. Since no requires_doc_text flags have been set, we are currently providing doc text for all bugs, unless otherwise indicated.

I can see the logic that something fixed in 3.3.3 should not appear again in 3.4. In this case, I will set the doc text flag to - and remove the text. If there are other bugs that you feel do not require text, please set the requires_doc_text flag to -.

Thanks.

Comment 15 Jodi Biddle 2014-05-22 00:59:42 UTC
As customers tend to consume errata as individual objects, especially from release to release, we will have to repeat ourselves if necessary. The question isn't about whether the doc text should be included in more than one errata if necessary (it should) but whether the issue itself warrants a specific tech note at all.

Comment 16 errata-xmlrpc 2014-06-09 15:18:42 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.

http://rhn.redhat.com/errata/RHEA-2014-0601.html