-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli/conn+config: ux annoyance: ui shows "host:port"; cli takes --host, --port separately #23277
Comments
Looks like you're supposed to split out This could use a better error message; something like "couldn't connect to |
Interesting. Wouldn't the user go to the Admin UI, check the hostname, and use that in the command though? In any case, we need to make the syntax clearer in the Docs then. |
Hm yeah the commands in the docs say |
But yes, it's annoying that you can't just copy/paste the
|
The UI could hide the port if it's the default. We could also encourage the use of the |
Maybe a little "copy to clipboard" icon next to the |
I did not even know I'm not keen on the other suggestions here, mostly because they wouldn't really address this issue. |
Having the same flags on the client commands as on There's also the issue that the URLs are confusing, at least for secure mode. Every time I want to run |
Oh that's unfortunate. I had hoped that the URL flag would just be shorthand for the host and port flags, where you could omit defaulted fields, like:
But now that I think about it, of course it's the connection string-style URLs. That's unfortunate. |
#24628 points out that we use the I think it's probably best to allow |
So I worked on the However some of the This is trivial to extend to non-SQL cli commands, by having those extract what they need from the URL. |
28373: cli: make --host/--{listen,advertise,http}-addr recognize port numbers r=knz a=knz cc @jseldess @Amruta-Ranade Fixes #23277. Needed for #5816. Prior to this patch, the various `cockroach` sub-commands would take separate flags to specify an address/hostanme and to specify a port number. Meanwhile: 1. `--join` would recognize the syntax `host:port`. 2. the web UI, docs and other places often refer to a "server address" as the pair hostname:portnr. For user convenience, it is thus important to make the interface more straightforward/regular. This patch achieves this as follows: - the flags `--listen-addr`/`--advertise-addr`/`--http-addr` (server-side) and `--host` (client-side) now recognize the syntax `host/addr:port`. - the server-side `--port` flags are still recognized for backward compatibility but are marked as deprecated. The client-side `--port` is still recognized and not deprecated for now, but hidden from the contextual help. As a side-effect of recognizing the port number inside the same flag, the syntax with square brackets for IPv6 addresses now becomes necessary when specifying also a port number. The syntax without square brackets (and without port number) is temporarily still recognized for backward compatibility, but is also marked as deprecated. Release note (cli change): the server-side command line flag `--listen-addr`, which replaces the previous `--host` flag, is now equipped to recognize both a hostname/address and port number. The `--port` flag is deprecated as a result. Release note (cli change): the server-side command line flag `--http-addr`, which replaces the previous `--http-host` flag, is now equipped to recognize both a hostname/address and port number. The `--http-port` flag is deprecated as a result. Release note (cli change): the server-side command line flag `--advertise-addr`, which replaces the previous `--advertise-host` flag, is now equipped to recognize both a hostname/address and port number. The `--advertise-port` flag is deprecated as a result. Release note (cli change): the client-side command line flag `--host` is now equipped to recognize both a hostname/address and port number. The client-side `--port` flag is still recognized, but not documented any more; `--host` is now preferred. Release note (cli change): the environment variable COCKROACH_PORT that specifies the port number to use for client commands is now deprecated. The port number can be placed in the COCKROACH_HOST environment variable instead. Release note (cli change): The syntax to specify IPv6 addresses with the client-side command line flag `--host` is changed to use square brackets, for example `--host=[::1]` instead of just `--host=::1` previously. The previous syntax is still recognized for backward compatibility but is deprecated. Release note (cli change): the flag `--listen-port` which was introduced in a recent change is now removed. (DOCS NOTE: remove both this release note and the previous one that introduced --listen-port) Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
While trying to decommission a dead node following the instructions in the Remove nodes doc, the
./cockroach node decommission 4 --wait=live --insecure --host=localhost:26257
command gave the following error even though localhost:26257 is a live node:Whereas
./cockroach node decommission 4 --wait=live --insecure
did decommission the node.The text was updated successfully, but these errors were encountered: