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

EndpointState has incorrect json key (fixes #298) #299

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

adutra
Copy link
Contributor

@adutra adutra commented Mar 17, 2022

What this PR does:

Fixes incorrect RPC address for Cassandra 4.0.

Which issue(s) this PR fixes:
Fixes #298

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CHANGELOG.md updated (not required for documentation PRs)
  • CLA Signed: DataStax CLA

@adutra adutra requested a review from a team as a code owner March 17, 2022 10:42
@burmanm
Copy link
Contributor

burmanm commented Mar 17, 2022

This needs a test update, the node_replace test uses 3.11.10.

@burmanm
Copy link
Contributor

burmanm commented Mar 17, 2022

I meant the e2e test. There's no verification that the feature actually works with 4.x, only that we fetch different JSON key.

@@ -475,7 +475,7 @@ func (ns NsWrapper) RetrieveStatusFromNodetool(podName string) []NodetoolNodeInf
nodeTexts := regexp.MustCompile(`(?m)^.*(([0-9a-fA-F]+-){4}([0-9a-fA-F]+)).*$`).FindAllString(output, -1)
nodeInfo := []NodetoolNodeInfo{}
for _, nodeText := range nodeTexts {
comps := regexp.MustCompile(`[[:space:]]+`).Split(nodeText, -1)
comps := regexp.MustCompile(`[[:space:]]+`).Split(strings.TrimSpace(nodeText), -1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is because with C* 4 there is some dangling whitespace at the end of the line. This doesn't happen with C* 3.

@burmanm burmanm merged commit b7e8c77 into k8ssandra:master Mar 18, 2022
@adutra adutra deleted the endpoint-fix branch March 18, 2022 13:49
burmanm pushed a commit that referenced this pull request Apr 5, 2022
* EndpointState has incorrect json key (fixes #298)

* Add unit test

* Change e2e test to use 4.0.3

* Fix RetrieveStatusFromNodetool

(cherry picked from commit b7e8c77)
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.

K8SSAND-1327 ⁃ EndpointState has incorrect json key
2 participants