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

Cluster with external DC has auth issues: "Cannot achieve consistency level LOCAL_ONE" #1272

Closed
adejanovski opened this issue Apr 5, 2024 · 0 comments · Fixed by #1297
Closed
Assignees
Labels
bug Something isn't working done Issues in the state 'done'

Comments

@adejanovski
Copy link
Contributor

When creating a new cluster using an external DC, the Cassandra pods will be provisioned, but the reaper pod is not provisioned, and auth does not work with the superuser account (nodetool, cqlsh ,etc.).

❯ kubectl get pods -n training-feq80wdm
NAME READY STATUS RESTARTS AGE
training-cluster-jedi-rack1-sts-0 2/2 Running 0 53m
training-cluster-jedi-rack2-sts-0 2/2 Running 0 53m
training-cluster-jedi-rack3-sts-0 2/2 Running 0 53m

❯ kubectl exec -it -n training-feq80wdm training-cluster-jedi-rack1-sts-0 -c cassandra -- /bin/bash
dse@training-cluster-jedi-rack1-sts-0:$ nodetool -u training-cluster-superuser -pw password status
nodetool: Failed to connect to '127.0.0.1:7199' - FailedLoginException: 'Failed to login. Please re-try.'.
dse@training-cluster-jedi-rack1-sts-0:
$ cqlsh -u training-cluster-superuser -p password 10......
Connection error: ('Unable to connect to any servers', {'10.....:9042': AuthenticationFailed('Failed to authenticate to 10.40.2.14:9042: Error from server: code=0100 [Bad credentials] message="Failed to login. Please re-try."',)})
The DSE logs identify this as a problem, which will be repeatably written to the logs.

INFO [mainIOThread-9] 2024-03-20 19:19:39,558 RpcMethodDse68.java:138 - Failed to execute method NodeOps.createRole
java.lang.reflect.InvocationTargetException: null
...
Caused by: org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level LOCAL_ONE
To workaround this, I had to alter the system_auth keyspace on the external DC to replicate to the MC DC. Afterward, auth works and the cluster finishes provisioning the reaper pod, alters non-user keyspaces RF, etc.

It appears that when we perform such an expansion, we wait for the CassandraDatacenter to be ready before updating the schema, but the state of the schema makes the role updates fail in cass-operator, preventing the cassdc to get to a ready state.
Updating the schema before the readiness wait could potentially unblock this case.

@adejanovski adejanovski added the bug Something isn't working label Apr 5, 2024
@adejanovski adejanovski moved this to In Progress in K8ssandra Apr 5, 2024
@adejanovski adejanovski added the in-progress Issues in the state 'in-progress' label Apr 5, 2024
@adejanovski adejanovski self-assigned this Apr 5, 2024
@adejanovski adejanovski moved this from In Progress to Ready For Review in K8ssandra Apr 8, 2024
@adejanovski adejanovski added ready-for-review Issues in the state 'ready-for-review' and removed in-progress Issues in the state 'in-progress' labels Apr 8, 2024
@adejanovski adejanovski moved this from Ready For Review to Review in K8ssandra Apr 11, 2024
@adejanovski adejanovski added review Issues in the state 'review' and removed ready-for-review Issues in the state 'ready-for-review' labels Apr 11, 2024
@adejanovski adejanovski moved this from Review to Ready For Review in K8ssandra Apr 22, 2024
@adejanovski adejanovski added ready-for-review Issues in the state 'ready-for-review' and removed review Issues in the state 'review' labels Apr 22, 2024
@adejanovski adejanovski moved this from Ready For Review to Review in K8ssandra Apr 23, 2024
@adejanovski adejanovski added review Issues in the state 'review' and removed ready-for-review Issues in the state 'ready-for-review' labels Apr 23, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in K8ssandra Apr 24, 2024
@adejanovski adejanovski added done Issues in the state 'done' and removed review Issues in the state 'review' labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Issues in the state 'done'
Projects
No open projects
Archived in project
1 participant