cli: cockroach init
lack of argument validation leads to confusing error message
#24628
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
S-3-ux-surprise
Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Milestone
FEATURE REQUEST
I did not find anything via
'cli is:open'
cockroach start --join
accepts hosts in the formathost:port
cockroach init
requires separate--host
and--port
arguments, which would be slightly odd but fine, except thatcockroach start
) that the incorrectcockroach init --host=localhost:12345
will work, it doesn't give you an invalid argument error and exit, it (apparently?) passes the bad arg through and you get a networking error (pasted below). I spent waaaaay too much time scratching my head before realizing that this was due to a bad argument and not something "network-y" on my machine. This is especially confusing because (a) I'm not a networking expert, and (b) the error message is talking about RPCs and credentials and such.The feature request is that
cockroach init
validate its arguments and print an error message and exit instead of the current behavior.Error message for incorrect
--host
arg tocockroach init
:The text was updated successfully, but these errors were encountered: