Skip to content

propolis-cli: accept ip:port for server address#1148

Open
MorganaFuture wants to merge 1 commit into
oxidecomputer:masterfrom
MorganaFuture:cli-server-ip-port
Open

propolis-cli: accept ip:port for server address#1148
MorganaFuture wants to merge 1 commit into
oxidecomputer:masterfrom
MorganaFuture:cli-server-ip-port

Conversation

@MorganaFuture
Copy link
Copy Markdown

propolis-cli -s parsed its argument as a bare host and discarded any port, so passing -s 127.0.0.1:12345 (the form propolis-server prints 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 -p flag, so -s takes IP:PORT the same way propolis-server run already does. The migrate destination 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 12400 anymore), 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) and cargo 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.

`-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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

propolis-cli -s is very confused with a port number

1 participant