Created attachment 930569 [details] first answerfile Description of problem: [ INFO ] Stage: Misc configuration [ INFO ] Creating Engine database schema [ ERROR ] Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine/dbscripts/create_schema.sh' failed to execute [ INFO ] Yum Performing yum transaction rollback [ INFO ] Rolling back database schema [ INFO ] Clearing Engine database engine [ ERROR ] Engine database rollback failed: FATAL: password authentication failed for user "engine" FATAL: password authentication failed for user "engine" Version-Release number of selected component (if applicable): av11.1 How reproducible: 100%, automatically and manually Steps to Reproduce: 1. rhevm-setup --config-append=working 2. rhevm-cleanup --config-append=cleanup 3. rhevm-setup --config-append=setup Actual results: Expected results: Additional info: Found by automated testing, probably introduced with av11.1
Created attachment 930570 [details] cleanup answerfile
Created attachment 930571 [details] third answerfile
Created attachment 930572 [details] second setup logfile
[root@localhost ~]# tail /var/lib/pgsql/data/pg_hba.conf # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ident 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
Found simplier reproducing vector: [ INFO ] Execution of setup completed successfully [root@localhost ~]# export PGPASSWORD=123456; psql -d engine -U engine -h localhost -t -A -c '--' psql: FATAL: password authentication failed for user "engine" [root@localhost ~]# history | tail -n 5 5 2014-08-25 18:19:22 hostname 6 2014-08-25 18:19:32 vim working 7 2014-08-25 18:19:53 rhevm-setup --config-append=working 8 2014-08-25 18:24:16 export PGPASSWORD=123456; psql -d engine -U engine -h localhost -t -A -c '--' 9 2014-08-25 18:24:51 history | tail -n 5
The bug is actually that setting the postgres provisioning to true, generates the database password even if it was specified in the answerfile, changing the option: OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:True to OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:False in the first setup answerfile works as expected.
I don't see any change in behaviour when trying postgresProvisioning set to False.... http://jenkins.qa.lab.tlv.redhat.com:8080/view/RhevmCore/view/3.4-All/job/3.4-git-rhevmCore-infra_tools_setup/29/console
Tried manually running on freshly installed system with the OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:False and got following result. It looks one would have to create the db manually in such case. INFO ] Creating Engine database schema [ ERROR ] Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine/dbscripts/create_schema.sh' failed to execute [ INFO ] Yum Performing yum transaction rollback [ INFO ] Rolling back database schema [ INFO ] Clearing Engine database engine [ ERROR ] Engine database rollback failed: could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? So my guess is that if OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:True is set, the password from answerfile is ignored and new password is generated.
As discussed, we should also refrain from writing to the answer file the randomly-generated password. This way, mere use of setup-generated answer file will keep the existing behavior (generate a new password), while special cases will still be able to supply their own password even if auto provisioning.
bug fixed in vt3. if you think it's not included in latest build, please contact rhev-integ
in vt3
Simone - did you check this also on dwh/reports?
(In reply to Yedidyah Bar David from comment #14) > Simone - did you check this also on dwh/reports? Engine DB password should now be handled correctly also installing DWH and reports, didn't try what happens with DWH and reports DB password. I'll check.
Perhaps take parts or all of the doctext from the 3.4 clone: Previously, rhevm-setup with automatic provisioning ignored a database password if one was supplied in the answer file. A new random password was generated and written to the generated answer file. Now, for automatic provisioning, if a password is supplied in the answer file, it is not ignored, and the password is not written to the answer file that is generated at the end.