cli: fix cockroach quit#26158
Conversation
|
Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. pkg/cli/start.go, line 1075 at r1 (raw file):
Could you extract this string constant so that it's shared with the other use? As is, it will rot too easily. pkg/cli/start.go, line 1078 at r1 (raw file):
Perhaps also mention that we don't fold this into Comments from Reviewable |
This patch fixes the following: - the logic in `doShutdown()` aims to ignore errors caused by attempts connect to a server which is closing its gRPC channels, but was missing one case of such errors: during the initial check whether the node was running. This patch causes gRPC "closed connection" errors to become also ignored in that case. - previously if there was a transient gRPC error during a hard shutdown whereby the shutdown could still succeed, then `cockroach quit` would fail no matter what. This patch makes `cockroach quit` retry a hard shutdown. - the warning messages are now emitted on stderr (via `log.Warningf`) instead of stdout. Release note (bug fix): fix a bug where `cockroach quit` would erroneously fail even though the node already successfully shut down. Release note (cli change): `cockroach quit` now emits warning message on its standard error stream, not standard output.
|
Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. pkg/cli/start.go, line 1075 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
I made a mistake -- this string is not generated by the server. Solved the problem in a different way (retry hard shutdown). pkg/cli/start.go, line 1078 at r1 (raw file): Previously, tschottdorf (Tobias Schottdorf) wrote…
n/a. Comments from Reviewable |
|
bors r+ |
|
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending. Comments from Reviewable |
Build failed |
|
bors failed on #26098, retrying bors r+ |
|
bors r- |
Canceled |
|
(bors was stuck) bors r+ |
Timed out |
|
bors r+ |
Timed out (retrying...) |
| // out, or perhaps drops the connection while waiting). To that end, we first | ||
| // run a noop DrainRequest. If that fails, we give up. | ||
| if err := checkNodeRunning(ctx, c); err != nil { | ||
| if grpcutil.IsClosedConnection(err) { |
There was a problem hiding this comment.
answered to ben there. if the server does not exist the thing still fails.
|
bors r- |
|
bors r+ |
|
internal bors weirdness, retrying bors r=knz |
Build failed (retrying...) |
26143: opt: Enable additional logic tests for opt configs r=andy-kimball a=andy-kimball Enable more logic tests (orms -> snapshot_unrelated_update). Fix various bugs and issues that were failing tests. 26158: cli: fix `cockroach quit` r=knz a=knz Informs/fixes #25870. Fixes #26144. This patch fixes the following: - the logic in `doShutdown()` aims to ignore errors caused by attempts connect to a server which is closing its gRPC channels, but was missing one case of such errors: during the initial check whether the node was running. This patch causes gRPC "closed connection" errors to become also ignored in that case. - previously if there was a transient gRPC error during a hard shutdown whereby the shutdown could still succeed, then `cockroach quit` would fail no matter what. This patch makes `cockroach quit` retry a hard shutdown. - the warning messages are now emitted on stderr (via `log.Warningf`) instead of stdout. Release note (bug fix): fix a bug where `cockroach quit` would erroneously fail even though the node already successfully shut down. Release note (cli change): `cockroach quit` now emits warning message on its standard error stream, not standard output. 26165: roachtest: enable periodic heap prof output for kv/splits/nodes=3 r=tschottdorf a=petermattis See #26081 Release note: None 26167: encryption: add cli command `cockroach gen encryption-key` r=windchan7 a=windchan7 Added cli command `cockroach gen encryption-key` to generate store keys for encryption at rest. Encryption CLI: #19783. Release note: None Co-authored-by: Andrew Kimball <andyk@cockroachlabs.com> Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com> Co-authored-by: Peter Mattis <petermattis@gmail.com> Co-authored-by: Victor Chen <victor@cockroachlabs.com>
Build succeeded |
Informs/fixes #25870.
Fixes #26144.
This patch fixes the following:
the logic in
doShutdown()aims to ignore errors caused by attemptsconnect to a server which is closing its gRPC channels, but was
missing one case of such errors: during the initial check whether
the node was running. This patch causes gRPC "closed connection"
errors to become also ignored in that case.
previously if there was a transient gRPC error during a hard
shutdown whereby the shutdown could still succeed, then
cockroach quitwould fail no matter what. This patch makescockroach quitretry a hard shutdown.
the warning messages are now emitted on stderr (via
log.Warningf)instead of stdout.
Release note (bug fix): fix a bug where
cockroach quitwoulderroneously fail even though the node already successfully shut down.
Release note (cli change):
cockroach quitnow emits warning messageon its standard error stream, not standard output.