-
Notifications
You must be signed in to change notification settings - Fork 66
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
K8SSAND-1327 ⁃ EndpointState
has incorrect json key
#298
Comments
EndpointState
has incorrect json keyEndpointState
has incorrect json key
The net effect of this bug is that node replacements are broken with C* 4.0.1 and presumably 4.0.3. We are pulling this into the current sprint since node replacements is a frequently used feature. Here's a link to the start of the discussion in Discord. We should also make sure this works with DSE. I will confirm the exact versions. |
The NATIVE_TRANSPORT_ADDRESS is a field in the Cassandra configuration and IIRC the management-api returns the endpointState JSON as a combination of several inputs, not just the Cassandra's state. So outright replacing the JSON key is not going to be the correct approach most likely. |
I checked
I suggest that we support all 3, and we will likely need to strip the port part from
|
@sseidman can you post the entire json payload for |
|
What happened?
EndpointState
has incorrect json key in struct (cass-operator/pkg/httphelper/client.go
Line 64 in 77eecf9
GetRpcAddress()
would resolve to a valid IP address for a node, but was returning "". Should default toNATIVE_TRANSPORT_ADDRESS
when no rpc address is returned for an endpoint, but the cass-management-api call actually returnsNATIVE_ADDRESS_AND_PORT
Did you expect to see something different?
Expected the value from
NATIVE_ADDRESS_AND_PORT
to be returned inGetRpcAddress
call, not an empty stringHow to reproduce it (as minimally and precisely as possible):
execute
curl http://localhost:8080/api/v0/metadata/endpoints
from a pod to see the json value returned and the presence ofNATIVE_ADDRESS_AND_PORT
instead ofNATIVE_TRANSPORT_ADDRESS
Reproduce failed node replacement (how the issue was found):
k8ssandra/cass-management-api:4.0.1-v0.1.30
node_replace
test (https://github.com/k8ssandra/cass-operator/blob/master/tests/node_replace/node_replace_suite_test.go)replaceIP: ""
instead of the actual replace addressEnvironment
AWS
Cass Operator version:
* Kubernetes version information: `Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:33:37Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"darwin/amd64"}Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.9-dd.1", GitCommit:"f71f8bd315fe5d6d7d44b619bd9364362fb8d9a8", GitTreeState:"clean", BuildDate:"2021-08-06T21:03:07Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"linux/amd64"}` * Kubernetes cluster kind:```"docker.io/k8ssandra/cass-operator:v1.9.0"
k8ssandra deployment
insert manifests relevant to the issue
controllers.CassandraDatacenter calling Management API start node - POST /api/v0/lifecycle/start {"cassandradatacenter": "cassandra-k8ssandra-seid/dc1", "requestNamespace": "cassandra-k8ssandra-seid", "requestName": "dc1", "loopID": "a15cf01d-43c1-4ae0-a41c-ab58ef7cb24c", "namespace": "cassandra-k8ssandra-seid", "datacenterName": "dc1", "clusterName": "k8ssandra-seid", "pod": "k8ssandra-seid-dc1-rack1-sts-0", "podIP": "xx.xx.xx.xx", "replaceIP": ""}
The text was updated successfully, but these errors were encountered: