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

Add support for OPENSEARCH_JAVA_HOME #1603

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

reta
Copy link
Collaborator

@reta reta commented Feb 9, 2022

Signed-off-by: Andriy Redko andriy.redko@aiven.io

Description

Add support for OPENSEARCH_JAVA_HOME

Issues Resolved

Closes #1600

Testing

The scripts have been tested under Windows / Linux

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta reta requested a review from a team February 9, 2022 20:57
@reta
Copy link
Collaborator Author

reta commented Feb 9, 2022

@dblock whenever you have time please

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

LGTM

"%JAVA_HOME%\bin\java" -cp "%SCRIPT_DIR%\..\..\opendistro_security_ssl\*;%SCRIPT_DIR%\..\deps\*;%SCRIPT_DIR%\..\*;%SCRIPT_DIR%\..\..\..\lib\*" org.opensearch.security.tools.AuditConfigMigrater %*

rem comparing to empty string makes this equivalent to bash -v check on env var
if not "%OPENSEARCH_JAVA_HOME%" == "" (
Copy link
Member

Choose a reason for hiding this comment

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

Swap the if to avoid the not.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I ported it from opensearch-env.bat, just to keep the detection of the JVM to use uniform

@dblock dblock requested a review from peternied February 10, 2022 18:35
@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2022

Codecov Report

Merging #1603 (7aee239) into main (933dc8f) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1603      +/-   ##
============================================
- Coverage     64.68%   64.66%   -0.03%     
  Complexity     3219     3219              
============================================
  Files           247      247              
  Lines         17351    17351              
  Branches       3082     3082              
============================================
- Hits          11224    11220       -4     
- Misses         4577     4581       +4     
  Partials       1550     1550              
Impacted Files Coverage Δ
...org/opensearch/security/rest/TenantInfoAction.java 77.94% <0.00%> (-10.30%) ⬇️
...security/configuration/DlsFlsFilterLeafReader.java 60.47% <0.00%> (+0.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e0be1eb...7aee239. Read the comment docs.

@peternied peternied merged commit 7ebb2ca into opensearch-project:main Feb 10, 2022
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
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

Successfully merging this pull request may close these issues.

Add support for OPENSEARCH_JAVA_HOME
4 participants