Answer file key for "nonlocal postgres"

Hello, I’m working on an answerfile for an unattended Ovirt install. The engine and the data warehouse DBs live remotely. I think I have most of the relevant keys defined, but appear to be missing one, because the installer is attempting to manage a local Postgres. Log and error below. Keys I’ve defined so far are: OVESETUP_DB/secured=bool:False OVESETUP_DB/user=str:engine OVESETUP_DB/password=str:[SNIP] OVESETUP_DB/dumper=str:pg_custom OVESETUP_DB/database=str:ovirt_engine OVESETUP_DB/fixDbViolations=none:None OVESETUP_DB/host=str:[SNIP] OVESETUP_DB/port=int:5435 OVESETUP_DB/filter=none:None OVESETUP_DB/restoreJobs=int:2 OVESETUP_DB/securedHostValidation=bool:False And a similar set for the DWH. Anyone know what I am missing? Thanks in advance, -j - - - - The user error is: [ INFO ] Creating PostgreSQL 'ovirt_engine' database [ ERROR ] Failed to execute stage 'Misc configuration': Failed to start service 'postgresql' [ INFO ] Yum Performing yum transaction rollback From the installer log, it obviously still thinks it is supposed to set up PG locally: 2017-03-23 23:57:18 DEBUG otopi.context context._executeMethod:128 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.provisioning.postgres.Plugin._misc 2017-03-23 23:57:18 INFO otopi.ovirt_engine_setup.engine_common.postgres postgres.provision:485 Creating PostgreSQL 'ovirt_engine' database 2017-03-23 23:57:18 DEBUG otopi.transaction transaction._prepare:61 preparing 'File transaction for '/var/lib/pgsql/data/pg_hba.conf'' 2017-03-23 23:57:18 DEBUG otopi.filetransaction filetransaction.prepare:185 file '/var/lib/pgsql/data/pg_hba.conf' exists 2017-03-23 23:57:18 DEBUG otopi.filetransaction filetransaction.prepare:219 backup '/var/lib/pgsql/data/pg_hba.conf'->'/var/lib/pgsql/data/pg_hba.conf.20170323235718' 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service postgresql 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'stop', 'postgresql.service'), executable='None', cwd='None', env=None 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'stop', 'postgresql.service'), rc=0 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'stop', 'postgresql.service') stdout: 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'stop', 'postgresql.service') stderr: 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 starting service postgresql 2017-03-23 23:57:18 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'start', 'postgresql.service'), executable='None', cwd='None', env=None 2017-03-23 23:57:19 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'start', 'postgresql.service'), rc=1 2017-03-23 23:57:19 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'start', 'postgresql.service') stdout: 2017-03-23 23:57:19 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'start', 'postgresql.service') stderr: Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xe" for details. 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'File transaction for '/var/lib/pgsql/data/pg_hba.conf'' 2017-03-23 23:57:19 DEBUG otopi.context context._executeMethod:142 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/provisioning/postgres.py", line 201, in _misc self._provisioning.provision() File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py", line 496, in provision self.restartPG() File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/postgres.py", line 397, in restartPG state=state, File "/usr/share/otopi/plugins/otopi/services/systemd.py", line 141, in state service=name, RuntimeError: Failed to start service 'postgresql' 2017-03-23 23:57:19 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Misc configuration': Failed to start service 'postgresql' 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'Yum Transaction' 2017-03-23 23:57:19 INFO otopi.plugins.otopi.packagers.yumpackager yumpackager.info:80 Yum Performing yum transaction rollback Loaded plugins: fastestmirror, versionlock 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'DWH Engine database Transaction' 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'Database Transaction' 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'Version Lock Transaction' 2017-03-23 23:57:19 DEBUG otopi.transaction transaction.abort:119 aborting 'DWH database Transaction'

On Fri, Mar 24, 2017 at 3:08 AM, Jamie Lawrence <jlawrence@squaretrade.com> wrote:
Hello,
I’m working on an answerfile for an unattended Ovirt install. The engine and the data warehouse DBs live remotely. I think I have most of the relevant keys defined, but appear to be missing one, because the installer is attempting to manage a local Postgres. Log and error below. Keys I’ve defined so far are:
OVESETUP_DB/secured=bool:False OVESETUP_DB/user=str:engine OVESETUP_DB/password=str:[SNIP] OVESETUP_DB/dumper=str:pg_custom OVESETUP_DB/database=str:ovirt_engine OVESETUP_DB/fixDbViolations=none:None OVESETUP_DB/host=str:[SNIP] OVESETUP_DB/port=int:5435 OVESETUP_DB/filter=none:None OVESETUP_DB/restoreJobs=int:2 OVESETUP_DB/securedHostValidation=bool:False
And a similar set for the DWH.
Anyone know what I am missing?
Probably OVESETUP_PROVISIONING/postgresProvisioningEnabled and OVESETUP_DWH_PROVISIONING/postgresProvisioningEnabled . That said, I strongly recommend to not try and write the answer file by hand. Instead, do an interactive setup with the exact conditions you want it for eventually (including remote DBs etc), and use the generated one. You are of course welcome to review it and edit if you think it's needed, but that's much easier than guessing what needs to be added (or removed). See also: https://www.ovirt.org/develop/developer-guide/engine/engine-setup/ http://www.ovirt.org/develop/developer-guide/engine/otopi/ And also: https://bugzilla.redhat.com/show_bug.cgi?id=1396925 If eventually getting into 4.2 (no promises), it will not really help you to _guess_, but will help better understand the relation between the interaction and the generated answerfile.
Thanks in advance,
-j
- - - - The user error is:
[ INFO ] Creating PostgreSQL 'ovirt_engine' database [ ERROR ] Failed to execute stage 'Misc configuration': Failed to start service 'postgresql' [ INFO ] Yum Performing yum transaction rollback
From the installer log, it obviously still thinks it is supposed to set up PG locally:
Indeed, but I'd say the user error (from your pov) isn't that this failed (although why this failed is a good question too) but that it tried. Are you sure you do not have the above keys set to True in the answer file? Best, -- Didi

On Mar 25, 2017, at 10:57 PM, Yedidyah Bar David <didi@redhat.com> wrote:
On Fri, Mar 24, 2017 at 3:08 AM, Jamie Lawrence <jlawrence@squaretrade.com> wrote:
[…]
Anyone know what I am missing?
Probably OVESETUP_PROVISIONING/postgresProvisioningEnabled and OVESETUP_DWH_PROVISIONING/postgresProvisioningEnabled .
Appreciate the reply - thanks!
That said, I strongly recommend to not try and write the answer file by hand. Instead, do an interactive setup with the exact conditions […]
I know what I was doing is unsupported. I was wondering down the wrong troubleshooting path for a bit there, but I think ultimately what I need is also unsupported. It was because I was trying to push this into our extant DB infrastructure, which is PG 9.5. Which I found doesn’t work with a local-install, either. (I was thinking it would work due to past experience with things that demand an old Postgres; IME, PG generally has pretty solid forward-compatibility.) So that leads me to my next question: if I install under the supported version and dump/load/reconfigure to PG9.5.3, is anyone aware of any actual problems (other than lack of official support)? In doing answerfile-driven installs repeatedly, the point where it now fails is after the DB load, with ovirt-aaa-jdbc-tool choking and failing the run. The reason I’m considering that as my fallback, nothing-else-worked option is that the DB needs to live in one of our existing clusters. We are a heavy Postres shop with a lot of hardware, humans and process devoted to maintaining it, and the DBAs would hang my corpse up as a deterrent to others if I started installing ancient instances in random places for them to take care of.
Was unaware of that; thanks for sharing (and doing!) it. Thanks for the help, -j
participants (2)
-
Jamie Lawrence
-
Yedidyah Bar David