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

Removes check to validate presence of OPENSEARCH_INITIAL_ADMIN_PASSWORD variable from preinst script of DEB distribution #4453

Conversation

DarshitChanpura
Copy link
Member

Description

While testing 2.12 RC it was discovered that the current check to validate whether OPENSEARCH_INITIAL_ADMIN_PASSWORD env variable is defined, is flawed and doesn't work always. There were other options considered as well but none satisfy a uniform experience for preinstall script :

  1. dpkg-query -W opensearch (current): Prematurely evaluates to true as soon as install starts
  2. dpkg -l opensearch : Works only in upgrade scenarios. For fresh installation preinst doesn't break (which is what is expected). Prematurely evaluates to true as soon as install starts.
  3. dpkg-query -s opensearch | grep -i ("Status: install ok installed"): fails on upgrade (it shouldn't), works fine for fresh installation

Hence, this PR removes changes from preinstall script for DEB distribution.

Note: RPM is not affected.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…f DEB distribution

Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
@DarshitChanpura DarshitChanpura changed the title Removes OPENSEARCH_INITIAL_ADMIN_PASSWORD check from preinst script of DEB distribution Removes check to validate presence of OPENSEARCH_INITIAL_ADMIN_PASSWORD variable from preinst script of DEB distribution Feb 14, 2024
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9ecf30a) 91.55% compared to head (90203fa) 91.55%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4453   +/-   ##
=======================================
  Coverage   91.55%   91.55%           
=======================================
  Files         190      190           
  Lines        6214     6214           
=======================================
  Hits         5689     5689           
  Misses        525      525           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DarshitChanpura .

Waiting for @prudhvigodithi to give another approval.

Thanks

@peterzhuamazon peterzhuamazon merged commit a193bbd into opensearch-project:main Feb 14, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants