-
Notifications
You must be signed in to change notification settings - Fork 53
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
Wrong IP addresses registered when using Docker overlay network #20
Comments
I should mention I was using a docker image I built from a version of hsds that was cloned from the master branch two weeks ago. I am using docker version 19.03.1, and running the hsds nodes using docker swarm. |
I agree that the behavior around HSDS binding to a particular IP needs improvement. However, I'm not sure that this part is the way to do it:
My concerns here are that there are more private networks allowed than just the 127 network, some of the HSDS deployments won't be able to reach out to 8.8.8.8, some hostnames might not be exposed to the local DNS, and this code doesn't work on IPV6 networks. However, I do agree that the IP discovery code needs improvement. |
Just to throw this out... for Kubernetes deployments there is no head node at all. Instead SN and Dn nodes use the Kubernetes API to get IPs for the other nodes (see line 279 bin basenode.py). I don't know if this approach would work for Docker. I couldn't find anything on using the Docker SDK from a container. |
I think that the main point @znarthur makes here is that there are usually multiple IPs associated with a docker container - a local docker network only IP, and possibly a public facing IP. Picking the wrong one can be bad a few different ways. For one, the bound port might be for the other IP. Also, putting the service node on a docker private IP breaks access. For HSDS on docker, it might just be too hard to predict what the sysadmin wants, and HSDS might have to use an explicit IP:port configuration approach. |
Using
170: peername = request.transport.get_extra_info('peername')
in headnode.py fetches the node IP of the overlay network, and not the IP of the registering service/data node.I replaced line 170 with a few lines of code into the register function to accept an 'addr' field from the registering node:
and I added the following function to basenode.py to be invoked while sending the register signal:
The text was updated successfully, but these errors were encountered: