turned out fixing this was a bit of a pita. java adds some %scope_id to the end of ipv6 addresses for getHostAddress() calls, however it does
not allow specifying an address with this scopeid (so the code needs to look for this and strip it).
re ben's comment on using [ipv6]:port the current patch on
ZOOKEEPER-667 doesn't have this. I currently have ipv6:port, where the code looks
for the trailing :# on the connect string to pull out the port number. I'm not convinced that [ipv6]:port is really the way to go
1) parsing the connect string is more complicated
2) anyone trying to generate the connect string (esp code) now has to handle this as a special case as well
if we just always require ipv
:port and our code looks for trailing :port I think we are fine. the only small discrepancy
is that we allow ipv4 w/o port, in which case we default the port to 2181. In the case of ipv6 we will always require
the user to specify ipv6:port (ie no default for port in this case).
what do you think? I don't want to change things later, so if you see a problem with this we should just switch to the
[ipv6]:port stuff now rather than change things for users later.