Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opensearch 2.15 needs OPENSEARCH_INITIAL_ADMIN_PASSWORD when installing #55

Open
rogermartensson opened this issue Jul 8, 2024 · 3 comments

Comments

@rogermartensson
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: Puppet 7
  • Ruby:
  • Distribution: Ubuntu 22.04
  • Module version: 1.1.0

How to reproduce (e.g Puppet code you use)

Creating of a new install.

What are you seeing

Getting an install error.

What behaviour did you expect instead

Successful install

Output log

...
Error: /Stage[main]/Opensearch::Install::Package/Package[opensearch]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install opensearch' returned 100: Reading package lists...
...
ERROR: Something went wrong during demo configuration installation. Please see the logs in /var/log/opensearch/install_demo_configuration.log
dpkg: error processing package opensearch (--configure):
 installed opensearch package post-installation script subprocess returned error exit status 1
...

Any additional information you'd like to impart

On a new install I get an installation failure.

...
Error: /Stage[main]/Opensearch::Install::Package/Package[opensearch]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install opensearch' returned 100: Reading package lists...
...
ERROR: Something went wrong during demo configuration installation. Please see the logs in /var/log/opensearch/install_demo_configuration.log
dpkg: error processing package opensearch (--configure):
 installed opensearch package post-installation script subprocess returned error exit status 1
...

This is the last rows in the log file mentioned.

...
Detected OpenSearch Version: 2.15.0
Detected OpenSearch Security Version: 2.15.0.0
No custom admin password found. Please provide a password via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD.

Setting OPENSEARCH_INITIAL_ADMIN_PASSWORD before running puppet fixes the problem but would be nice if not needed. You may have to purge the failed package first.

@alexskr
Copy link

alexskr commented Aug 6, 2024

OPENSEARCH_INITIAL_ADMIN_PASSWORD is required starting with v2.12
https://opensearch.org/docs/2.12/install-and-configure/install-opensearch/debian/

@flepoutre
Copy link

Hello, any news about this ?

@smortex
Copy link
Member

smortex commented Dec 5, 2024

This "new" behavior of OpenSearch installation does not make sense. It should be fixed upstream rather than worked around in every piece of code that wants to setup OpenSearch.

I wrote a proposal for fixing packages:
opensearch-project/security#4344

If you are able to help there, that would be awesome, and if you cannot, maybe voting for it would help getting it more traction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants