Description of problem: Various places, including CI/QE and the engine appliance, maintain answer files for engine-setup, in order to achieve unattended setup. This breaks whenever a new question is added to engine-setup. It will be helpful if we add an option called '--accept-defaults' which will make engine-setup prompt only for questions for which it does not supply a default, accepting the defaults for all of the others. We should consider doing this change also in related tools - engine-cleanup, ovirt-engine-rename, hosted-engine setup, etc. We will probably need to change otopi, perhaps even only otopi. This is of course also useful for normal interactive use, in case the user knows that the defaults are ok.
*** Bug 1270723 has been marked as a duplicate of this bug. ***
*** Bug 1270722 has been marked as a duplicate of this bug. ***
*** Bug 1270721 has been marked as a duplicate of this bug. ***
Initially I thought this was a great idea. Then I actually thgouh I do want the scripts to break, so CI / QE can think if they want: 1. To accept the default or: 2. Support different options - both the default and the non-default. This enhancement might hide this. Perhaps CI should use it and QE not.
I'd say the criteria isn't if it's in QE or CI but about what we want to test. Tests that test engine-setup should probably not use this option, for the reasons in comment 4. Tests that test the engine, or something else which merely needs engine-setup in order to prepare the test, should IMO use this option, as they should fail if something break in what they are supposed to test, not something else.
Not sure bug 1295945 is really related - it's just that if we solve current, we can supply there a much smaller one. But if we had a reason to pass 'mode=virt', this won't help.
The HE flow is considered to be one of the more important ones now. This RFE would help to make this flow more robust. Without this fix we have the risk from release to release that we miss to update the currently hardcoded answerfile.
A change to otopi to allow this is already merged in master [1]. I didn't link current bug there nor moved to MODIFIED because I didn't add a nice option '--accept-defaults' to engine-setup. To make engine-setup accept defaults, please add this to your answer file: DIALOG/autoAcceptDefault=bool:True Or pass on the command line: --otopi-environment='DIALOG/autoAcceptDefault=bool:True' Please note that it affects only the human (default) dialect, not the machine one. So it can't be used e.g. for host-deploy (or the new cockpit interface) - it's expected that machine dialect clients can easily do this (accept the default) by themselves. [1] https://gerrit.ovirt.org/55479
So, looking at comment #8, shouldn't this move to ON_QA?
(In reply to Sandro Bonazzola from comment #9) > So, looking at comment #8, shouldn't this move to ON_QA? I thought we want to add an engine-setup option '--accept-defaults' that will set env. If we don't, IMO we should at least add this to --help, which is not less work, so better just add the option.
Ok for adding the option.
A clarification: Using this option, you'll never be prompted by questions that have defaults. E.g.: 1. engine-cleanup with only this option, will always fail - because it defaults to 'Cancel' in: All the installed ovirt components are about to be removed, data will be lost (OK, Cancel) [Cancel]: To workaround this, add the answer to above question to the answer file too. 2. If you run engine-setup with only this option, and supply a too-easy admin password, you'll not be prompted 'Use weak password?', because it defaults to 'No'. So you'll be forced to supply a strong one. To workaround this, add an admin password to the answer file.
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.
This wont be automated, basic sanity will be sufficient for verification process. [root@engine /]# engine-setup --help Usage: /usr/bin/engine-setup ... --accept-defaults Automatically use default answers in questions that have them.
Megan, sorry for causing a confusion. engine-cleanup does not have an option '--accept-defaults'. Comment 12 was a clarification to comment 8, which referred to adding the line 'DIALOG/autoAcceptDefault=bool:True' to the answer file. Adding it to the answer file for engine-setup is the same as passing '--accept-defaults'. engine-cleanup does not have '--accept-defaults', but users can still add this line to the answer file for the same effect. If they do, they have to consider comment 12. Perhaps it's simplest to drop the part about 'engine-cleanup' from the doc text.
Thanks for clearing that up Didi. I've removed the part about engine-cleanup from the doc text.