-
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
Add unmanaged tablet flag at vttablet level #14871
Add unmanaged tablet flag at vttablet level #14871
Conversation
Signed-off-by: Noble Mittal <[email protected]>
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
|
Signed-off-by: Noble Mittal <[email protected]>
@GuptaManan100 can you please have a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have end to end tests for unmanaged tablets @rohit-nayak-ps? If we do, we should add this flag there to make sure that the validations are correct.
We also need to add summary changes.
We don't explicitly setup unmanaged tablets in e2e tests currently. @beingnoble03, how did you test these changes? |
Thanks for this, @beingnoble03 . I wanted to note that this PR doesn't fix #12092 entirely. These have not been addressed:
@deepthi, one of the reasons that issue was originally created was, iirc, that incompatible flags were being specified when vttablets were started which did not apply and were causing either errors or unexpected behavior. (I forget the details). If we have (or can enumerate) the list of such flags, we can add it to the validations added in this PR. Aside: |
Signed-off-by: Noble Mittal <[email protected]>
@rohit-nayak-ps thanks for the review. I changed |
Yes, This PR needs to address these points too. I added some validations which I thought were necessary, but if we can enumerate a list of incompatible flags, I can proceed further adding checks for these flags. I think we can update the docs, in a separate follow-up PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies it took a while for me to review this PR, I had some other more urgent things to work on.
@deepthi Can you think of other validations that we want to make behind this --unmanaged
flag? I looked at the doc https://vitess.io/docs/18.0/user-guides/configuration-advanced/unmanaged-tablet/ and couldn't find anything else.
That doc itself feels a lot out of date, because it still mentions init_populate_metadata
which I think doesn't exist anymore in vttablets.
Signed-off-by: Noble Mittal <[email protected]>
@deepthi @GuptaManan100 is there any other validation which we need to include here? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14871 +/- ##
==========================================
- Coverage 65.65% 65.64% -0.01%
==========================================
Files 1563 1563
Lines 194395 194427 +32
==========================================
+ Hits 127627 127632 +5
- Misses 66768 66795 +27 ☔ View full report in Codecov by Sentry. |
Rest looks good to me, we would need to add summary changes for the same for 20.0.0. @deepthi Do you have any other change in mind? |
@GuptaManan100 we should also add some unit tests for |
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
@GuptaManan100 @ajm188 added required tests for |
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR itself looks mostly fine, except we may need to add some more validations.
|
||
New flag `--unmanaged` has been introduced in this release to make it easier to flag unmanaged tablets. It also runs validations to make sure the unmanaged tablets are configured properly. | ||
|
||
Starting this release, all unmanaged tablets should specify this flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People can still not specify this, and just specify the existing set of flags, correct?
We should make this language stronger, and say that we recommend setting this flag so that we can validate all the related flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about this again, and I believe we should deprecate --disable_active_reparents
along with adding this flag.
For backwards compatibility, we should deprecate --disable_active_reparents
in v20, and delete it in v21.
The internal value of mysqlctl.DisableActiveReparents
should be the OR of --unmanaged
and --disable_active_reparents
in v20, and just the value of --unmanaged
in v21.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disable_active_reparents
is used in vtctldclient as well to prevent that specific instance from running reparent commands. I don't think we can get rid of that. We could rename the flag on vtctld too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be fine to leave that flag on vtctld. Having the same flag name on vttablet and vtctld was always confusing. I'm not sure if the two are sharing code which might make this separation more complicated, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 😎 I made the required changes and deprecated the flag only on the required binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do need to update the website docs for Unmanaged tablet, so I added that label back
|
||
New flag `--unmanaged` has been introduced in this release to make it easier to flag unmanaged tablets. It also runs validations to make sure the unmanaged tablets are configured properly. | ||
|
||
Starting this release, all unmanaged tablets should specify this flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about this again, and I believe we should deprecate --disable_active_reparents
along with adding this flag.
For backwards compatibility, we should deprecate --disable_active_reparents
in v20, and delete it in v21.
The internal value of mysqlctl.DisableActiveReparents
should be the OR of --unmanaged
and --disable_active_reparents
in v20, and just the value of --unmanaged
in v21.
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only thing left is website documentation.
I'll do the website docs update by EOD. Update - Here is the docs PR - vitessio/website#1702 |
Description
Adds a
--unmanaged
flag for vttablet, which Indicates an unmanaged tablet, i.e. using an external mysql-compatible database. It will help add both better visibility and user experience while setting up unmanaged tablets.Related Issue(s)
Checklist