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

MariaDB compatibility in HA mode is broken #5266

Closed
pavel-usov opened this issue Sep 4, 2018 · 2 comments
Closed

MariaDB compatibility in HA mode is broken #5266

pavel-usov opened this issue Sep 4, 2018 · 2 comments

Comments

@pavel-usov
Copy link
Contributor

pavel-usov commented Sep 4, 2018

It is not possible to run Vault 0.11.0 in HA mode with MariaDB backend. Login into Vault fails with following error message.

core: failed to acquire lock: error="mysql: lock already held"

In sources I found the cause of this.
physical/mysql/mysql.go, line 623:

rows, err := i.in.Query("SELECT GET_LOCK(?, -1), IS_USED_LOCK(?)", i.key, i.key)

Vault tries to get an infinite lock here, but MariaDB doesn't support this feature. Only positive numbers are allowed as second parameter in GET_LOCK.

As a solution I would suggest to use a very big number as a timeout to be considered as "infinite"

@pavel-usov
Copy link
Contributor Author

I've submitted a pull request which shoud fix the issue
#5343

@briankassouf
Copy link
Contributor

Closed by #5343

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