generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 7
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
CREATE USER
fails in subsequent hooks if bootstrap fails after creating user
#157
Labels
bug
Something isn't working
Comments
carlcsaposs-canonical
added a commit
that referenced
this issue
Nov 27, 2023
Fixes #157 Previously, the charm assumed that if a user was created or deleted that the databag would be updated accordingly. However, if a user is created or deleted and the event/hook fails, the user creation/deletion will go through for MySQL but the databag will not be updated (since the event failed). When the event is retried, the charm tried to create a user that already exists or delete a user that doesn't exist
carlcsaposs-canonical
added a commit
that referenced
this issue
Nov 28, 2023
Fixes #157 Previously, the charm assumed that if a user was created or deleted that the databag would be updated accordingly. However, if a user is created or deleted and the event/hook fails, the user creation/deletion will go through for MySQL but the databag will not be updated (since the event failed). When the event is retried, the charm tried to create a user that already exists or delete a user that doesn't exist
github-actions bot
added a commit
to carlcsaposs-canonical/mysql-router-k8s-operator
that referenced
this issue
Jul 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If
CREATE USER
succeeds but the bootstrap fails (in the same hook), the user credentials won't be saved to the databag.Router currently relies on the databag to check which users it's already created. In subsequent hooks, router fails to create the user because it already exists
Steps to reproduce
Steps 3-6 https://microstack.run/#get-started
Unable to reproduce consistently (server connection must succeed for create user and then immediately fail for bootstrap)
Expected behavior
Router charm raises uncaught exception but then recovers when server is reachable
Actual behavior
Router charm gets stuck in exception after server becomes reachable
Log output
Juju debug log:
logs.txt
logs-unit.txt
Additional context
Reported by @gboutry—thank you!
The text was updated successfully, but these errors were encountered: