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

Bootstrap with force #187

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Bootstrap with force #187

merged 1 commit into from
Jan 10, 2024

Conversation

carlcsaposs-canonical
Copy link
Contributor

@carlcsaposs-canonical carlcsaposs-canonical commented Jan 10, 2024

Instead of relying on the existence of old router user to cleanup router from cluster metadata, force bootstrap so that the metadata does not need to be cleaned up.

Fixes canonical/mysql-k8s-operator#345. The issue was that the router charm would delete the user & router metadata, but that only the user deletion would go through. Then, on the router charm's next hook, the bootstrap failed because the metadata was not cleaned up.

Additional context: https://chat.canonical.com/canonical/pl/temrphcp3in5xqftkaxgowqtkr

Instead of relying on the existence of old router user to cleanup router from cluster metadata, force bootstrap so that the metadata does not need to be cleaned up.

Fixes canonical/mysql-k8s-operator#345. The issue was that the router charm would delete the user & router metadata, but that only the user deletion would go through. Then, on the router charm's next hook, the bootstrap failed because the metadata was not cleaned up.
Copy link
Collaborator

@paulomach paulomach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, the name option was any useful?

@carlcsaposs-canonical
Copy link
Contributor Author

btw, the name option was any useful?

yes but I decided not to implement it so that we wouldn't need an upgrade migration

I think since the only benefit is supporting the corner case where a non-charmed router is deployed on the same host, it's not worth implementing—but happy to implement if others see it differently

Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tnx!

@carlcsaposs-canonical carlcsaposs-canonical merged commit d89b0f8 into main Jan 10, 2024
13 checks passed
@carlcsaposs-canonical carlcsaposs-canonical deleted the bootstrap-force branch January 10, 2024 14:21
carlcsaposs-canonical added a commit to canonical/mysql-router-operator that referenced this pull request Jan 10, 2024
Instead of relying on the existence of old router user to cleanup router from cluster metadata, force bootstrap so that the metadata does not need to be cleaned up.

Fixes canonical/mysql-k8s-operator#345. The issue was that the router charm would delete the user & router metadata, but that only the user deletion would go through. Then, on the router charm's next hook, the bootstrap failed because the metadata was not cleaned up.

Ported from canonical/mysql-router-k8s-operator#187
@sunpengRvi
Copy link

Hi experts, I am stuck on this issue, any manual workaround I can do to resolve this for now?

@carlcsaposs-canonical
Copy link
Contributor Author

Hi experts, I am stuck on this issue, any manual workaround I can do to resolve this for now?

@sunpengRvi Which revision of the charm are you using? Is it deployed in production?

carlcsaposs-canonical added a commit to canonical/mysql-router-operator that referenced this pull request Mar 5, 2024
Instead of relying on the existence of old router user to cleanup router from cluster metadata, force bootstrap so that the metadata does not need to be cleaned up.

Fixes canonical/mysql-k8s-operator#345. The issue was that the router charm would delete the user & router metadata, but that only the user deletion would go through. Then, on the router charm's next hook, the bootstrap failed because the metadata was not cleaned up.

Ported from canonical/mysql-router-k8s-operator#187
carlcsaposs-canonical added a commit to canonical/mysql-router-operator that referenced this pull request Mar 5, 2024
Instead of relying on the existence of old router user to cleanup router
from cluster metadata, force bootstrap so that the metadata does not
need to be cleaned up.

Fixes canonical/mysql-k8s-operator#345. The
issue was that the router charm would delete the user & router metadata,
but that only the user deletion would go through. Then, on the router
charm's next hook, the bootstrap failed because the metadata was not
cleaned up.

Ported from
canonical/mysql-router-k8s-operator#187
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.

mysql-router-k8s: bootstrap failure
4 participants