-
Notifications
You must be signed in to change notification settings - Fork 285
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
Pass in strong password instead to fix integtest workflow #4302
Changes from 1 commit
03a719b
1048e38
545ddd9
6722ec8
e601645
48a40e2
e9b23ea
7480dde
00fa11f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,10 @@ def install(self, bundle_name: str) -> None: | |
logging.info("deb installation requires sudo, script will exit if current user does not have sudo access") | ||
deb_install_cmd = " ".join( | ||
[ | ||
'sudo' | ||
'env' | ||
'OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123!' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will only set the env variable for the duration of the |
||
'&&' | ||
'sudo', | ||
'dpkg', | ||
'--purge', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,10 @@ def install(self, bundle_name: str) -> None: | |
logging.info("rpm installation requires sudo, script will exit if current user does not have sudo access") | ||
rpm_install_cmd = " ".join( | ||
[ | ||
'sudo' | ||
'env' | ||
'OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123!' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above. |
||
'&&' | ||
'sudo', | ||
'yum', | ||
'remove', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ def install(self, bundle_name: str) -> None: | |
@property | ||
def start_cmd(self) -> str: | ||
start_cmd_map = { | ||
"opensearch": "./opensearch-tar-install.sh", | ||
"opensearch": "OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! ./opensearch-tar-install.sh", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this should be |
||
"opensearch-dashboards": "./opensearch-dashboards", | ||
} | ||
return start_cmd_map[self.filename] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wouldn't work for OS version lower than 2.12.
It may not make much sense to run integration tests for released 2.x versions but it will definitely break integ tests for 1.x line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! The code is generic for all versions as of today. Until we solve the branching problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To unblock this we can try adding if/else condition to differentiate with 1.x and above until we have this branching/versioning for the build repo solved. The script already has an argument
OPENSEARCH_VERSION
so adding if/else should be straight forward.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think issue with that is what if patch version 2.0 < patch version < 2.12 come along? I was looking into bash script to compare semantic version, but it seems complex, not sure how do you folks feel about adding something like this: https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rishabh6788 @gaiksaya @prudhvigodithi I changed the logic in the script itself to set a strong password if the version is after 2.12.0. Let me know if that makes sense to keep. I also included this logic in the integtest.sh files of repo's which have their own versions of integtest.sh.