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

Assumes that the user has keyspace create privileges. If the user does NOT have database create privileges, then the evolution will fail and crash the service. #4

Open
DevoKun opened this issue Aug 7, 2018 · 2 comments

Comments

@DevoKun
Copy link

DevoKun commented Aug 7, 2018

CREATE KEYSPACE IF NOT EXISTS $keySpace WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1}

@DevoKun
Copy link
Author

DevoKun commented Aug 7, 2018

There needs to be an alternate method to check if the Keyspace exists other than trying to create the keyspace. In my case the keyspace exists, but the service crashes because the user does not have create keyspace permissions.

@DevoKun DevoKun changed the title Assumes that the user has database create privileges. If the user does NOT have database create privileges, then the evolution will fail and crash the service. Assumes that the user has keyspace create privileges. If the user does NOT have database create privileges, then the evolution will fail and crash the service. Aug 7, 2018
@untoldwind
Copy link
Contributor

I assume it should be possible to use the list "List permissions" command for this, though I'm not sure if this would be a good idea. The evolution code is pretty generic and unable to guess what might be changed inside this script. It is very well possible that the ops-teams does not want the application-user to create new keyspaces (i.e. keyspaces are administered by some other means/manually).

Or the other way round: The evolution code for standard JDBC/SQL does not check the database permissions either.

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

2 participants