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

Trying to change keyspace before creating it (in case it was already … #3203

Closed
wants to merge 1 commit into from

Conversation

pamiel
Copy link
Contributor

@pamiel pamiel commented Feb 7, 2018

Summary

This PR addresses issue #2987 : it often happens that for production systems, DB administrators are the only ones able to create Keyspaces in Cassandra, while DB accounts used at service runtime are not granted this right. In this situation, the Kong migration process will never be allowed to create the keyspace.

This PR allows both legacy behavior (migration process is creating keyspace) but also a new behavior (keyspace has been pre-created by a DBA, out of Kong migration process, so migration process does not consider the keyspace creation failure as a fatal error)

Full changelog

  • Update of "2015-01-12-175310_skeleton" migration process to enable keyspace pre-creation

Issues resolved

Fix #2987

thibaultcha pushed a commit that referenced this pull request Feb 7, 2018
When the keyspace was already created by a DBA, we would still attempt
to create it, possibly failing (due to insufficient permissions) and the
migrations would error out.

Instead, the new behavior ensures that if the keyspace already exists,
we simply switch to it and do not attempt any creation.

The previous behavior (creating the keyspace if it does not exist) is
still effective.

Fix #2987
From #3203

Signed-off-by: Thibault Charbonnier <[email protected]>
@thibaultcha
Copy link
Member

Very nice, manually merged to master with a few modifications. Thanks!

@thibaultcha thibaultcha closed this Feb 7, 2018
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.

Separation of concern for database administrators (Cassandra) during Kong migration process
2 participants