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

Add procedure to set cluster to read-only #724

Merged
merged 2 commits into from
Aug 5, 2024
Merged

Add procedure to set cluster to read-only #724

merged 2 commits into from
Aug 5, 2024

Conversation

masa213f
Copy link
Contributor

@masa213f masa213f commented Aug 5, 2024

This PR adds a procedure to set MySQL clusters to read-only.

If an user simply sets the "(super_)read_only" variable, MOCO will remove it in the clustering process.
And it can lead to accidents.

Therefore, I specify the procedure to stop clustering and make the cluster read-only.

@masa213f masa213f marked this pull request as ready for review August 5, 2024 02:36
docs/usage.md Outdated
You can check whether the cluster is read-only with the following command.

```console
$ kubectl moco mysql -it <CLSUTER_NAME> -- -e "SHOW GLOBAL VARIABLES like 'super_read_only'"
Copy link
Member

Choose a reason for hiding this comment

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

nit. I usually use SELECT @@super_read_only;.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. I updated. ce6332b

Copy link
Member

@ymmt2005 ymmt2005 left a comment

Choose a reason for hiding this comment

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

LGTM

@ymmt2005 ymmt2005 merged commit e866c56 into main Aug 5, 2024
17 checks passed
@ymmt2005 ymmt2005 deleted the read-only branch August 5, 2024 08:01
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.

2 participants