-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Examples: only terminate vtadmin if it was started #13433
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
014cbbe
Do not error stopping vtadmin web and api if pidd files do not exist.
jfg956 0487e79
Get rid of code duplication in vtadmin-down.sh.
jfg956 1a3da36
Use bash test
mattlord 66f60eb
Use SIGTERM and wait for process to end
mattlord 4a589a4
Validate function parameters
mattlord c8a7e47
Add license header
mattlord 966841b
Move vtadmin stop function to utils
mattlord 730edbe
Generalize simple process shutdown with timeout
mattlord e11d1c5
Correct output
mattlord b8ffa85
Remove now redundant log message
mattlord be72f81
Corrections
mattlord c78650d
Add missing license header to modified file
mattlord 8bcf746
Only check PID if we killed it
mattlord f928d17
Remove mix of spaces and tabs
mattlord File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| source "$(dirname "${BASH_SOURCE[0]:-$0}")/../env.sh" | ||
| # Copyright 2023 The Vitess Authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
|
mattlord marked this conversation as resolved.
|
||
| echo "Stopping vtadmin-web..." | ||
| kill -9 "$(cat "$VTDATAROOT/tmp/vtadmin-web.pid")" | ||
| source "$(dirname "${BASH_SOURCE[0]:-$0}")/../env.sh" | ||
|
|
||
| echo "Stopping vtadmin-api..." | ||
| kill -9 "$(cat "$VTDATAROOT/tmp/vtadmin-api.pid")" | ||
| stop_process "vtadmin-web" "$VTDATAROOT/tmp/vtadmin-web.pid" | ||
| stop_process "vtadmin-api" "$VTDATAROOT/tmp/vtadmin-api.pid" | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Copyright 2023 The Vitess Authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| source "$(dirname "${BASH_SOURCE[0]:-$0}")/../env.sh" | ||
|
|
||
| echo "Stopping vtorc." | ||
| kill -9 "$(cat "$VTDATAROOT/tmp/vtorc.pid")" | ||
| stop_process "vtorc" "$VTDATAROOT/tmp/vtorc.pid" | ||
|
mattlord marked this conversation as resolved.
|
||
|
|
||
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.