Created attachment 1345342 [details] answer file with appliance keys and custom engine-setup keys Description of problem: [RFE] To be able to add custom values for engine-setup from hosted-engine-setup answer file. Version-Release number of selected component (if applicable): rhvm-appliance-4.1.20171019.0-1.el7.noarch.rpm How reproducible: 100% Steps to Reproduce: 1. Add keys related to engine-setup into the hosted-engine-setup answer file. for example: OVESETUP_DWH_DB\* OVESETUP_REPORTS_DB\* 2. Run the command: hosted-engine --deploy --config-append=<the answer file above> Actual results: The custom keys related to engine-setup would not take effect Expected results: To be able to add keys related to engine-setup to the same answer file and we could do the deploy and custom engine-setup at the same time. OR To add one more option to "hosted-engine --deploy" like --engine-config-append=<the engine setup answer file> and there add the custom configuration for engine-setup. Additional info: You can see: 1. Example of the answer file that I tried to deploy with. 2. The answer file that created during hosted-engine --deploy
Created attachment 1345346 [details] the answer file that deployed (without the custom engine-setup keys)
for now, to be able to create custom engine-setup we create custom cloud-init iso as you can see in: https://github.com/fusor/ansible-ovirt/blob/master/roles/self_hosted_first_host/tasks/main.yml#L83
As far as I know, you can provide a customized cloud init payload while running ovirt-hosted-engine-setup, so you should be able to add whatever you want to the answer file to be passed to the engine. Simone can you give an hint here on how to do that? I think we can close this as not a bug.
From hosted-engine-setup currently you can: - generate a cloud-init ISO image without the capability to inject custom answer files for engine-setup on the engine VM - pass a a custom cloud-init ISO image where everything (including eventually back-porting workarounds for cloud-init bugs), non just engine-setup answer-files, will be up to you. We can add an intermediate option where hosted-engine-setup will still generate cloud-init ISO image for you but it will allow the user to add an additional answer file for engine-setup that will be injected in the cloud-init generate ISO image as well.
We introduced an hook mechanism on one of the setup ansible playbooks. The user can place custom files .yml file with ansible tasks under /usr/share/ovirt-hosted-engine-setup/ansible/hooks/enginevm_before_engine_setup/ and /usr/share/ovirt-hosted-engine-setup/ansible/hooks/enginevm_after_engine_setup/ The first set of tasks will be executed on the engine VM before running engine-setup (example: install custom engine rpms or inject something in the answer file for engine-setup), the second set will be executed after engine-setup (example: change some parameter with engine-config). Two examples are available in /usr/share/ovirt-hosted-engine-setup/ansible/hooks/enginevm_before_engine_setup/enginevm_before_engine_setup.yml.example and /usr/share/ovirt-hosted-engine-setup/ansible/hooks/enginevm_after_engine_setup/enginevm_after_engine_setup.yml.example
Forth to our conversation with Kobi, this is working fine now. Tested on: ovirt-hosted-engine-ha-2.2.5-1.el7ev.noarch ovirt-hosted-engine-setup-2.2.10-1.el7ev.noarch rhvm-appliance-4.2-20180202.0.el7.noarch Linux 3.10.0-693.19.1.el7.x86_64 #1 SMP Thu Feb 1 12:34:44 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.