cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

cli: correct cockroach init help text

Open neeral opened this issue 8 years ago • 4 comments

BUG REPORT

Cockroach version (also verified on v1.1.3).

ubuntu@jupiter-lb:~$ cockroach version
Build Tag:    v2.0-alpha.20180122
Build Time:   2018/01/22 14:30:46
Distribution: CCL
Platform:     linux amd64
Go Version:   go1.9
C Compiler:   gcc 6.3.0
Build SHA-1:  098b426bd50d40d90a3ff02f9fe7df738629629f
Build Type:   release-gnu

init help documentation is incorrect. It can be run from any node but the help text says it must be run on a node that appears in the --join flag.

$ cockroach init --help

Perform one-time-only initialization of a CockroachDB cluster.

After starting one or more nodes with --join flags, run the init
command on one node (passing the same --host and certificate flags
you would use for the sql command). The target of the init command
must appear in the --join flags of other nodes.
......

neeral avatar Feb 12 '18 19:02 neeral

I believe this text is accurate as written. If you run the init command with a target that is not in other nodes' join flags, the cluster may not become fully connected. This is discussed in https://github.com/cockroachdb/cockroach/pull/16371#issuecomment-317208368.

Or is this about the ambiguous wording about "run the init command on one node", where this could refer to either the node where the cockroach init process is run or the target of the init command (i.e. the --host argument)?

bdarnell avatar Mar 01 '18 22:03 bdarnell

I think this is actually a docs issue. We are not explicit about this restriction in the docs.

jseldess avatar Mar 02 '18 04:03 jseldess

Yes, the CLI is fine, the docs need updating.

neeral avatar Mar 02 '18 05:03 neeral

Created an issue in the docs repo, so closing this issue: https://github.com/cockroachdb/docs/issues/2589.

jseldess avatar Mar 02 '18 10:03 jseldess