Skip to content
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

P0 [dev.net] - Allow hostnames to be parsed for Narwhal config #1595

Merged
merged 10 commits into from
Apr 27, 2022

Conversation

velvia
Copy link
Contributor

@velvia velvia commented Apr 26, 2022

Quick review - allow hostnames to be used for Narwhal and Genesis/network configuration, not just IP addresses.

This is needed for AWS dev.net deployment (using local domain names, like in K8s, instead of fixed IPs)

@bmwill
Copy link
Contributor

bmwill commented Apr 26, 2022

looking at this I'm fairly confused on why this would be needed. this did work at some point so maybe there's something misconfigured in the environment you're running in?

@velvia
Copy link
Contributor Author

velvia commented Apr 26, 2022

@bmwill sorry the code was wrong, hopefully the new code will make it a bit more clear. The to_socket_addrs() function returns an Iter of addresses, it's not at all the same as the old parse() method.

parse() does not work with hostnames. It gives the same error as I got in a container:

thread 'rest_server_tests::test_concurrency' panicked at 'called `Result::unwrap()` on an `Err` value: AddrParseError(())', sui/src/config.rs:106:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I have changed the default hostname to localhost which did not work before in tests.

@velvia velvia merged commit 33677cf into MystenLabs:main Apr 27, 2022
@velvia velvia deleted the ec/validator-hostname-resolution branch April 27, 2022 17:00
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.

3 participants