Updated input parameters and added jmxPasswordFilePath variable to in…#183
Closed
Scharlotten wants to merge 1 commit intodatastax:masterfrom
Closed
Updated input parameters and added jmxPasswordFilePath variable to in…#183Scharlotten wants to merge 1 commit intodatastax:masterfrom
Scharlotten wants to merge 1 commit intodatastax:masterfrom
Conversation
…put files and updated nodetoolCredentials logic in the ds-collector bash script added the option to use the file
michaelsembwever
approved these changes
Jun 21, 2025
| export jmxPort | ||
| export jmxUsername | ||
| export jmxPassword | ||
| export jmxPasswordFilePath |
Member
There was a problem hiding this comment.
this isn't needed, as that variable is not used inside collect-info.rs
| if [[ -n ${jmxUsername} ]] && [[ -n ${jmxPassword} ]] ; then | ||
| nodetoolCredentials="-u $jmxUsername -pw $jmxPassword" | ||
| elif [[ -n ${jmxUsername} ]] && [[ -n ${jmxPasswordFilePath} ]] ; then | ||
| nodetoolCredentials="-u $jmxUsername -pwf $jmxPasswordFilePath" |
Member
There was a problem hiding this comment.
this works for nodetool executions, but there are other places jmxPassword is used that will now not work (both in this script and in the rust file ds-collector/rust-commands/collect-info.rs).
so i think we still have to read and set jmxPassword
e.g.
Suggested change
| nodetoolCredentials="-u $jmxUsername -pwf $jmxPasswordFilePath" | |
| while IFS= read -r line; do | |
| # Skip empty lines | |
| [[ -z "$line" ]] && continue | |
| # Read first two fields from the line | |
| read -r _role _password <<< "$line" | |
| if [[ "${_role}" == "${jmxUsername}" ]]; then | |
| jmxPassword="${_password}" | |
| break | |
| fi | |
| done < "${jmxPasswordFilePath}" | |
| nodetoolCredentials="-u $jmxUsername -pwf $jmxPasswordFilePath" |
202d5c9 to
6c30051
Compare
Member
|
i couldn't push to your fork @Scharlotten , so i've updated this PR here: #190 |
Member
|
merged in 87b1072 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…put files and updated nodetoolCredentials logic in the ds-collector bash script added the option to use the file
What this PR does:
Which issue(s) this PR fixes:
Fixes #
Checklist