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

Update mysql.go #6600

Closed
wants to merge 1 commit into from
Closed

Update mysql.go #6600

wants to merge 1 commit into from

Conversation

parkerss
Copy link

Add column names to the INSERT statement for the vault db table. The existing SQL fails if any other columns exist.

This has to be added to accommodate customization that's being done after-the-fact on our vault mysql database.

Previous mysql tests cover this change - I've also tested this change with mysql manually to verify it is OK.

Add column names to the INSERT statement for the vault db table
@hashicorp-cla
Copy link

hashicorp-cla commented Apr 17, 2019

CLA assistant check
All committers have signed the CLA.

@tyrannosaurus-becks tyrannosaurus-becks self-assigned this Apr 22, 2019
@tyrannosaurus-becks
Copy link
Contributor

Hi @parkerss ! Thanks for submitting this code!

Would you be willing to do a couple of things?

  • Add a test that duplicates the failure you're seeing
  • Then of course we'll be able to see that this code fixes the test

It would also be awesome to merge in master after this PR is merged: #6356. Mainly because you're working in the same areas of code and it'll ensure they're not interacting with each other in unexpected ways. They shouldn't, but just being cautious.

@parkerss
Copy link
Author

So this is a bit of a unique situation. We use your enterprise binary, which is built from this codebase, and in the ramp up to a big project going live in the coming months, found ourselves in a predicament. We do not have the ability to migrate our codebase to use kv v2 with age metadata, we are on kv v1, yet compliance requires we have the ability to expire data based on its age.

In the interim we will be adding a column to our MySQL (Aurora) database to meet that compliance requirement.

ALTER TABLE `vault-data` ADD COLUMN last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

Without this patch, the INSERT statement will not work due to the implicit columns not being aligned. With this patch applied, INSERT and all other mysql commands work as expected.

For obvious reasons, I do not wish to recommend the inclusion of that custom column to the main codebase when kv v2 is a better solution for most users, so it makes it difficult to include a test class that shows it solves our unique situation.

With that, how should we proceed?

Thanks!

@tyrannosaurus-becks
Copy link
Contributor

@parkerss hmmm, thanks for filling me in.

It sounds like what you really need is a custom enterprise binary. I'm not certain on the best way to go about that. I will reach out to our team internally. If you have a TAM or a support contact, perhaps you could pose the question through them as well? Or opening a support ticket through normal channels would work too.

I'll post here once I learn more. Thanks!

@catsby catsby added this to the not-scheduled milestone Nov 19, 2019
@catsby
Copy link
Contributor

catsby commented Dec 2, 2019

Hello - There doesn't seem to be any activity on this pull request as of late. If possible can we update this thread with resolution or next steps? I'm going to label this as waiting-for-reply for now.

@tyrannosaurus-becks
Copy link
Contributor

@catsby I'm thinking this should be safe to close since it's not intended to be included in Vault. @parkerss if you still need anything from us, please let us know. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants