-
Notifications
You must be signed in to change notification settings - Fork 198
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
Adding support for IPV6 addresses #3704
Conversation
…of 127.0.0.1 as ::ffff:127.0.0.1
14fd7a0
to
3cf068d
Compare
@@ -103,4 +103,5 @@ def test_limited_interface_binding(cert_dir: Optional[str]): | |||
|
|||
matched_conns = [conn for conn in conns if conn.laddr.port == ix.worker_result_port] | |||
assert len(matched_conns) == 1 | |||
assert matched_conns[0].laddr.ip == address | |||
# laddr.ip can return ::ffff:127.0.0.1 when using IPv6 | |||
assert address in matched_conns[0].laddr.ip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this always exactly the string "127.0.0.1" or the string "::ffff:127.0.0.1"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all my testing it is.
in my ipv6 only environment (without even a 127.0.0.1 loopback address), the default address detection detects no addresses and gives this error:
(I wanted to force that the workers would not be connecting over 127.0.0.1) -- i'll try this test in a different way but I think the address detection will still fail to detect the IPv6 addresses in address auto-detection. |
I didn't try very hard to make it work, but I couldn't get scoped addresses (https://en.wikipedia.org/wiki/IPv6_address#zone_index) to work. I think this probably isn't a big deal, but reporting it here anyway in case you want to document/investigate it more. |
* Update all components to use `addresses.tcp_url` to construct urls
… ZMQError if ip_address is bad
I think our goal is to get some basic variation of ipv6 addressing to work, not '100% support of ipv6', so that should be ok. In other news, looking at socket.py in zmq, it just does "%s:*" and f'{addr}:{port}', which isn't confidence boosting, making me think I should bracket ipv6 addr to be safe. However, I'll test both with and without brackets (from the compute side), to possibly eliminate one of the two options (bracket or not to bracket). Assuming both work, I'll go with bracketing to be safe, as that's the 'standard' and should be future-proof. |
Description
This PR adds a new option:
HighThoughputExecutor(loopback_address: str = "127.0.0.1")
which can be used to specify the internal address used by HTEX for communication between the executor and the interchange. In addition, all ZMQ sockets are now are set to having IPv6 enabled.The test config
htex_local
has been updated to useloopback_address="::1"
for testing.Changed Behaviour
loopback_address
which allows configuring the address used for internal communicationFixes # (issue)
Type of change
Choose which options apply, and delete the ones which do not apply.