cli: correct cockroach init help text
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.
......
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)?
I think this is actually a docs issue. We are not explicit about this restriction in the docs.
Yes, the CLI is fine, the docs need updating.
Created an issue in the docs repo, so closing this issue: https://github.com/cockroachdb/docs/issues/2589.