Skip to content

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

@iximeow

Description

@iximeow

in propolis-server we accept a SocketAddr as a binary argument outright, meaning you can run ./propolis-server run path/to/ovmf.fd 0.0.0.0:12345 and you're off.

however, in propolis-cli we have -s for the server address, and -p for the port. this makes for some confusing UI: if you ./propolis-cli -s 127.0.0.1:12345 to talk to that server you just started, this actually just gets you

failed to lookup address information: node name or service name not known

... because, i think, resolve_host is taking the string from the server parameter and forcing Rust to treat it as literally either IP address or hostname, with an explicit port 0 for the socket. :3000 makes it clearly not an IP address so Rust's ToSocketAddrs falls back to trying to look up the host which it also won't do, and whoops name or service not known.

i think we should probably drop the -p flag and expect ip:port in all cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    developmentRelating to engineering experience and development of propolis, not guest or product interfaces

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions