-
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
Make vttestserver docker image work with vtctldclient #14665
Merged
Merged
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
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
Dec 4, 2023
…cker image so that vtctldclient can access the vtctld server running in it Signed-off-by: Manan Gupta <[email protected]>
GuptaManan100
force-pushed
the
vttestserver-vtctld
branch
from
December 5, 2023 08:23
dc7fcd4
to
d93dcd5
Compare
GuptaManan100
added
Type: Enhancement
Logical improvement (somewhere between a bug and feature)
Component: vttestserver
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
NeedsIssue
A linked issue is missing for this Pull Request
labels
Dec 5, 2023
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
GuptaManan100
requested review from
ajm188,
deepthi,
derekperkins,
dkhenry,
mattlord and
frouioui
as code owners
December 5, 2023 08:57
frouioui
approved these changes
Dec 5, 2023
systay
approved these changes
Dec 5, 2023
ejortegau
pushed a commit
to slackhq/vitess
that referenced
this pull request
Dec 13, 2023
Signed-off-by: Manan Gupta <[email protected]>
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
While suggesting a way to create a new database in vttestserver with the
managed
mode, it was noticed that the docker image of vttestserver didn't actually support running anyvtctldclient
commands.On further investigation it was found that this was happening because the bind address provided to vtcombo was hard-coded to
127.0.0.1
which meant that in a docker environment it would never accept any requests coming from the outside even if port-forwarding was used. Therefore, this PR made the changes to configure this value from vttestserver as a flag and augmented the docker image to use a new environment variableVTCOMBO_BIND_HOST
to pass in the correct value.After making these changes, we are able to run vtctld commands issued through the vtctldclient against a docker image running vttestserver. Moreover, we also able to access the vtcombo status page.
For example, if we run -
We can connect to vtgate using the command
mysql --host 127.0.0.1 --port 33577 --user "root"
. We can verify that we have two databases running -We can also see the keyspaces by running the vtctldclient command like so -
Then we can create a new database in the vtgate mysql shell -
We can verify that the new keyspace is created like so -
We can now create a local vschema file like so -
We then use the vtctldclient to apply this vschema to the new keyspace -
Finally, we can verify that the foreign key mode has been successfully changed by running the following query in vtgate mysql shell -
We can also access the
/debug/status
page from vtcombo by visiting the sitehttp://localhost:33574/debug/status
-Tests to verify that vtctldclient works have also been added and ensured that they indeed work -
PASS: TestVtctldCommands/vttestserver-e2etest/mysql80 (6.54s)
Related Issue(s)
foreignKeyMode=managed
by default (invttestserver
) #14661Checklist
Deployment Notes