-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
cli: remove cockroach quit
#82988
cli: remove cockroach quit
#82988
Conversation
7c804b1
to
fe0792a
Compare
No, |
Technically it is; e.g., cloud report playbook uses it. |
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 at a high level.
build/archive/contents/README
Outdated
@@ -19,7 +19,7 @@ To interact with a one-node SQL cluster: | |||
|
|||
$ cockroach start --background --insecure | |||
$ cockroach sql --insecure | |||
$ cockroach quit --insecure | |||
$ killall -TERM cockroach # to shut down the nodes |
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.
One thing to note here is that on some Unices (looking at you Solaris), killall
will kill all processes on the system. Maybe that's obscure enough that we don't have to worry about it, given that we only officially support Linux and macOS does something similar here. But worth keeping in mind if we're going to sprinkle this all over our docs etc.
Then again, if some people do run those Unices, I guess they're already aware.
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.
Good point, Erik! Personally, I never run killall
. In this case, I'd probably use pgrep cockroach | xargs kill -TERM
, but I am also fine with killall
being in README.
Doesn't it make certain assumptions about our cloud setup though, e.g. project names and VM names and stuff? Seems like more trouble than it's worth to officially support it. It's called out in the README too:
|
I'll remove the release note. (After the other changes that CI will tell me to make.) |
build/verify-archive.sh
Outdated
@@ -9,7 +9,7 @@ | |||
set -euo pipefail | |||
|
|||
apt-get update | |||
apt-get install -y autoconf bison cmake libncurses-dev | |||
apt-get install -y autoconf bison cmake libncurses-dev psmisc |
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 assume that's for killall
? Maybe we could do away by using pgrep cockroach | kill -TERM
instead?
@@ -962,32 +962,33 @@ func TestClientConnSettings(t *testing.T) { | |||
|
|||
// For some reason, when run under stress all these test cases fail due to the | |||
// `--host` flag being unknown to quitCmd. Just skip this under stress. | |||
// TODO(knz): Check if this skip still applies. |
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.
Would be nice to lift the skip
if this no longer holds.
Release note: None
Release note: None
Release note: None
As of v20.1, the recommended way to shut down a node is to send SIGTERM, then wait for the process to gracefully terminate, then *only if it doesn't terminate within a reasonable delay* follow up with SIGKILL. The command `cockroach quit` was deprecated. In order to enable graceful shutdown tests, we thus need a new mechanism in `roachprod` to "send a signal then wait a reasonable amount of time until the process terminates". This patch introduces this via the new command-line flag `--max-wait`. Release note: None
Release note: None
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @erikgrinaker, @srosenberg, and @tbg)
build/verify-archive.sh
line 12 at r7 (raw file):
Previously, srosenberg (Stan Rosenberg) wrote…
I assume that's for
killall
? Maybe we could do away by usingpgrep cockroach | kill -TERM
instead?
pgrep
is part of procps
which needs to be installed to. Changed to use that instead.
build/archive/contents/README
line 22 at r6 (raw file):
Previously, srosenberg (Stan Rosenberg) wrote…
Good point, Erik! Personally, I never run
killall
. In this case, I'd probably usepgrep cockroach | xargs kill -TERM
, but I am also fine withkillall
being in README.
Changed to pkill
.
pkg/cli/flags_test.go
line 965 at r7 (raw file):
Previously, srosenberg (Stan Rosenberg) wrote…
Would be nice to lift the
skip
if this no longer holds.
I agree. But I don't think this should hold this PR.
bors r=erikgrinaker,srosenberg |
Build failed (retrying...): |
@tbg points out this might be flaky. Will investigate further. bors r- |
Canceled. |
Release note: None
Release note (backward-incompatible change): The `cockroach quit` command was removed. It had been deprecated since v20.1. To shut down a node gracefully, send a SIGTERM signal to it.
bors r=erikgrinaker,srosenberg |
Build succeeded: |
89526: bincheck: work around deprecated `cockroach quit` r=matthewtodd a=matthewtodd The `cockroach quit` subcommand has been [removed][1]. The recommended way to issue a graceful shutdown is sending a `SIGTERM` signal. [1]: #82988 Release note: None Co-authored-by: Matthew Todd <todd@cockroachlabs.com>
The `cockroach quit` subcommand has been removed[1]. The recommended way to issue a graceful shutdown is sending a `SIGTERM` signal. [1]: #82988 Release note: None
The `cockroach quit` subcommand has been removed[1]. The recommended way to issue a graceful shutdown is sending a `SIGTERM` signal. [1]: #82988 Release note: None
As per cockroachdb/docs#14299.
Release note (backward-incompatible change): The
cockroach quit
command was removed. It had been deprecated since v20.1. To shut down
a node gracefully, send a SIGTERM signal to it.
cc @taroface