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

Cassandra DB plugin List Users errors for DC failures #3438

Closed
navinanandaraj opened this issue Oct 9, 2017 · 16 comments
Closed

Cassandra DB plugin List Users errors for DC failures #3438

navinanandaraj opened this issue Oct 9, 2017 · 16 comments
Milestone

Comments

@navinanandaraj
Copy link
Contributor

List Users in Cassandra appears to use Quorum and ignores the consistency level specified during connection creation. This causes the connection validation to fail when Quorum is not met. Replacing List Users with Select role,is_superuser from system_auth.roles will resolve the issue as the select query would use the consistency level specified during connection config.

@jefferai
Copy link
Member

jefferai commented Oct 9, 2017

Given that this is a normal CQL query, isn't this an upstream issue?

@navinanandaraj
Copy link
Contributor Author

Yes I agree and we reached out to our Cassandra vendor but apparently some DDL like statements intentionally use Quorum and it was their suggestion to use Select if we need to leverage consistency

@jefferai
Copy link
Member

jefferai commented Oct 9, 2017

Anything you can forward our way? I don't know much about Cassandra so I'd want to be sure that select role,is_superuser from system_auth.roles is actually equivalent to a list users.

@jefferai jefferai added this to the 0.8.4 milestone Oct 9, 2017
@navinanandaraj
Copy link
Contributor Author

Actually I'm reading that it may not be the same Select across C* versions. I see that the query works on cqlsh 3.0 but need to see if it works on lower versions. Let me get back to you.

@navinanandaraj
Copy link
Contributor Author

Thinking about it a little more, do we need to do a list users or a equivalent. Think the purpose here is to validate if the C* session is good and wouldn't any Select cql be good ?

@kk-thd
Copy link

kk-thd commented Oct 10, 2017

If you are just doing connectivity test by using created credentials, it's worth to go route of generic CQL query test.. I can easily share CQL which can work in both versions, let me know please.

@navinanandaraj
Copy link
Contributor Author

Jeff,
List Users appears to be deprecated in Cassandra 3.0 and higher. Its replaced by List Roles which does not work for 2.x. Both mandates to Quorum consistency level no matter what we specify.

https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlListUsers.html

We found that 'List ALL' appears to work across all versions. It provides the list of users and also appears to use the consistency level we specify. We are confirming with our vendor if List ALL will most definitely work across all versions

@navinanandaraj
Copy link
Contributor Author

Just got a confirmation from our vendor that List ALL works on all versions and lists all the users.

@jefferai
Copy link
Member

So what is the appropriate CQL?

@navinanandaraj
Copy link
Contributor Author

List ALL

@jefferai
Copy link
Member

The capitalization on that makes me think that's not the real CQL. Can you submit a PR?

@navinanandaraj
Copy link
Contributor Author

Jeff,
The case doesn't matter. List all, list all, LIST ALL they all work. I'll submit a PR

@navinanandaraj
Copy link
Contributor Author

Jeff,
Created below PR
#3469

@jefferai
Copy link
Member

Closed by #3469

@navinanandaraj
Copy link
Contributor Author

Thanks Jeff. Do we have an ETA for 0.8.4 ?

@jefferai
Copy link
Member

Early November.

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

No branches or pull requests

3 participants