-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VReplication: Validate min set of user permissions in traffic switch prechecks #16762
Open
mattlord
wants to merge
14
commits into
vitessio:main
Choose a base branch
from
planetscale:vrepl_dry_run_perms
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,238
−947
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
vitess-bot
bot
added
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Sep 11, 2024
mattlord
removed
the
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
label
Sep 11, 2024
mattlord
force-pushed
the
vrepl_dry_run_perms
branch
from
September 11, 2024 17:58
15cf5c1
to
372b807
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16762 +/- ##
==========================================
- Coverage 68.93% 68.91% -0.02%
==========================================
Files 1566 1566
Lines 201885 202056 +171
==========================================
+ Hits 139172 139256 +84
- Misses 62713 62800 +87 ☔ View full report in Codecov by Sentry. |
mattlord
force-pushed
the
vrepl_dry_run_perms
branch
from
September 11, 2024 20:12
372b807
to
ec8366b
Compare
… switch dry run Signed-off-by: Matt Lord <mattalord@gmail.com>
mattlord
force-pushed
the
vrepl_dry_run_perms
branch
from
September 11, 2024 20:23
ec8366b
to
3963c78
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
mattlord
changed the title
VReplication: Validate full expected set of user permissions on traffic switch dry runs
VReplication: Validate min set of user permissions in traffic switch prechecks
Sep 11, 2024
mattlord
added
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
Component: VReplication
and removed
NeedsWebsiteDocsUpdate
What it says
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
labels
Sep 11, 2024
Signed-off-by: Matt Lord <mattalord@gmail.com>
mattlord
force-pushed
the
vrepl_dry_run_perms
branch
from
September 12, 2024 15:47
5d6dc26
to
a4fba70
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
mattlord
force-pushed
the
vrepl_dry_run_perms
branch
from
September 12, 2024 18:37
a4fba70
to
815493f
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
mattlord
requested review from
deepthi,
harshit-gangal,
ajm188,
GuptaManan100,
rohit-nayak-ps and
shlomi-noach
as code owners
September 16, 2024 17:38
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
rohit-nayak-ps
approved these changes
Sep 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds another check to the VReplication workflow traffic switching pre-checks that we do in order to avoid any potential downtime or client visible errors from attempting the traffic switch — heading off any user/customer impacting issues. This new check ensures that if we want to setup reverse replication — which is the default in order to support switching traffic back and forth with the
SwitchTraffic
andReverseTraffic
sub-commands — we ensure that the_vt.vreplication
table has the MySQL level privileges needed (select,insert,update,delete) in order to manage the reverse workflow.This is particularly helpful when working with "external" or "unmanaged" tablets that you would often use when first migrating to Vitess. In this case you have to manually setup the necessary privileges for the
--db_filtered_user
and other MySQL users that Vitess uses in themysqld
instances that these unmanaged tablets work with. This check ensures that we have the minimum privileges we need on those unmanaged tablets'mysqld
instances for when we execute theSwitchTraffic
sub-command.The test case in the issue then fails as expected when attempting to switch traffic:
Manual test
Results:
Related Issue(s)
Checklist