Skip to content

Commit

Permalink
cli: remove cockroach quit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
knz committed Jun 16, 2022
1 parent 35ab33e commit 6a0434b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 139 deletions.
2 changes: 0 additions & 2 deletions pkg/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ go_library(
"node.go",
"nodelocal.go",
"prefixer.go",
"quit.go",
"rpc_client.go",
"rpc_node_shutdown.go",
"sql_client.go",
Expand Down Expand Up @@ -321,7 +320,6 @@ go_test(
"node_test.go",
"nodelocal_test.go",
"prefixer_test.go",
"quit_test.go",
"sqlfmt_test.go",
"start_test.go",
"statement_bundle_test.go",
Expand Down
1 change: 0 additions & 1 deletion pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ func init() {
connectCmd,
initCmd,
certCmd,
quitCmd,

sqlShellCmd,
stmtDiagCmd,
Expand Down
7 changes: 3 additions & 4 deletions pkg/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,6 @@ func init() {
doctorRecreateClusterCmd,
genHAProxyCmd,
initCmd,
quitCmd,
sqlShellCmd,
/* StartCmds are covered above */
}
Expand Down Expand Up @@ -668,9 +667,9 @@ func init() {
cliflagcfg.BoolFlag(f, &nodeCtx.nodeDecommissionSelf, cliflags.NodeDecommissionSelf)
}

// Quit and node drain commands.
for _, cmd := range []*cobra.Command{quitCmd, drainNodeCmd} {
f := cmd.Flags()
// node drain command.
{
f := drainNodeCmd.Flags()
cliflagcfg.DurationFlag(f, &drainCtx.drainWait, cliflags.DrainWait)
cliflagcfg.BoolFlag(f, &drainCtx.nodeDrainSelf, cliflags.NodeDrainSelf)
}
Expand Down
21 changes: 0 additions & 21 deletions pkg/cli/interactive_tests/test_quit.tcl

This file was deleted.

80 changes: 0 additions & 80 deletions pkg/cli/quit.go

This file was deleted.

31 changes: 0 additions & 31 deletions pkg/cli/quit_test.go

This file was deleted.

0 comments on commit 6a0434b

Please sign in to comment.