IPv6 addresses #385

Closed
bitprophet opened this Issue Aug 19, 2011 · 11 comments

Projects

None yet

3 participants

@bitprophet
Member

Description

Currently it is not possible to specify IPv6 host address:

$ fab -H 2001:0DB8::1 taskname
[2001:0DB8::1] Executing task 'taskname'
Fatal error: Low level socket error connecting to host 2001: Invalid argument

Using square brackets http://serverfault.com/questions/205793/how-can-one-distinguish-the-difference-between-the-host-and-the-port-in-an-ipv6-u can help to separate address and port. And maybe we can make brackets optional by using more sophisticated regex patterns to distinguish IPv6 addresses from hostnames and IPv4 addresses.

What do you think?


Originally submitted by Max Arnold (LwarX) on 2011-07-11 at 01:18pm EDT

@bitprophet bitprophet was assigned Aug 19, 2011
@bitprophet
Member

Jeff Forcier (bitprophet) posted:


I am +1 on improving IPv6 support. What I'm unsure of is whether control over that is in our hands or if it's in the Paramiko level.

If you have time, take a gander at fabric/network.py::connect() and follow that as far as needed to figure out which eg os.socket calls are used. I don't remember offhand if we (or Paramiko) are using something that precludes use of IPv6 style addresses.

Hopefully it's just something dumb we're doing that is mangling it, but I suspect it may not be that easy.


on 2011-07-11 at 01:45pm EDT

@bitprophet
Member

Max Arnold (LwarX) posted:


I think Paramiko itself already supports IPv6 (both hostnames and raw addresses). SSHClient.connect() method accepts separate arguments for username/host/port, so there is no additional parsing required. I did a quick test with raw v6 address and it worked out just fine.

Fabric expects host specification in form username@host:port and fails to parse IPv6 notation because of semicolon. Hostnames with AAAA records are supported just fine (I was able to connect to v6-only machine by using DNS alias in /etc/hosts). What needs to be fixed is fabric/network.py::host_pattern, and related functions for host normalization/denormalization.


on 2011-07-11 at 03:11pm EDT

@bitprophet
Member

Jeff Forcier (bitprophet) posted:


I'm all ears for a better regex that is backwards compatible with how host strings behave now. Don't really have time to come up with it on my own at the moment :( especially as you're the first person to run into this specific problem so far -- it's not affecting a ton of people yet.


on 2011-07-11 at 04:37pm EDT

@max-arnold
Contributor

Finally managed to do some work on this issue. Feature branch is here: https://github.com/max-arnold/fabric/tree/385-ipv6-hosts

@bitprophet
Member

Great, thanks -- let's move discussion over to the pull request.

@bitprophet bitprophet closed this Dec 2, 2011
@henrikno
henrikno commented Aug 2, 2012

What happened with this issue? I'm in need if IPv6 support.

@bitprophet
Member

Looks like Github failed to auto-link the related pull request, which is #491.

@bitprophet
Member

@zerd If you have time to try and update Max's pull request patches so they apply to the current Fabric master branch, I can try to prioritize merging it. Thanks!

@max-arnold
Contributor

I will be able to allocate some time to update the patch in a few days.

@bitprophet
Member

Thanks @max-arnold ! @zerd, please follow #491 so we can keep discussion in one spot. Hopefully see you over there in a while, Max.

@max-arnold
Contributor

@zerd, could you please test the branch mentioned in #491?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment