propolis-cli: accept ip:port for server address#1148
Conversation
`-s` parsed only a host and threw away any port, so `-s 127.0.0.1:12345` failed with a name resolution error. Parse the server argument as a full socket address and drop the now-redundant `-p` flag, matching how propolis-server already takes its IP:PORT argument.
|
hello! this'll be a nice, and thank you for including the docs in the change as well 🙏 fwiw I am realizing now that while I thought I'd spoken a bit off-the-cuff in saying " you didn't hear this from me but if you do want to give this a try end to end: if you run an illumos guest on a Linux host, from that guest's perspective a nested VM will work well enough to at least see this change work with |
propolis-cli -sparsed its argument as a bare host and discarded any port, so passing-s 127.0.0.1:12345(the formpropolis-serverprints and accepts) failed with "node name or service name not known". This parses the server argument as a full socket address and drops the now-redundant-pflag, so-stakesIP:PORTthe same waypropolis-server runalready does. Themigratedestination argument gets the same treatment, and the README/docs examples are updated to match.Note this is a small breaking change to the CLI: a port is now required (there's no default
12400anymore), per the issue's suggestion to "expect ip:port in all cases".Closes #1062.
Tested with
cargo test -p propolis-cli(added unit tests for the parser) andcargo clippy, built on Linux. I don't have an illumos host, so I couldn't exercise the CLI end-to-end against a running propolis-server.