[BUG] install_demo_configuration.[sh|bat] assumeyes behavior not working as expected
What is the bug?
The install_demo_configuration scripts are not actually setting all prompts to y when using the -y option as you would expect. This issue was initially uncovered in this PR: https://github.com/opensearch-project/security/pull/2308
In addition to the behavior of -y, there is no command line option available to only install the demo certificates and leave initsecurity and cluster_mode as false.
The install_demo_configuration scripts should be updated with a -y option that actually accepts all prompts and a new option should be added to only install the demo certificates.
It looks like opensearch build makes use of the -y command in opensearch-docker-entrypoint.sh, opensearch-tar-install, opensearch-onetime-setup.sh, and the two build templates for rpm and debian post-installation.
Bugs like this are a good reason to migrate away from our current command line scripts.
- https://github.com/opensearch-project/security/issues/1755
[Triage] @scrawfor99 add documentation change to address that the code will not be corrected / follow up with the build team about desired change for the behavior.
@cwperks updates on this issue?
assumeyes is being handled in the updated installer: https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/tools/democonfig/Installer.java#L198-L218
Closing this issue.
This bug fix touches a number of different repositories as they already use -i with -y option.
Proposed Fix:
- Introduce a new option to generate demo certs :
-d - Modify the tool to assume
-d,-i,-cas yes when-yis passed. Else individual options need to be passed - Modify different distributions and integ tests across different repositories.