Change in vdsm[master]: jsonrpc: make TCPReactor IPv6 capable
psebek at redhat.com
psebek at redhat.com
Fri Aug 2 09:58:45 UTC 2013
Petr Šebek has posted comments on this change.
Change subject: jsonrpc: make TCPReactor IPv6 capable
......................................................................
Patch Set 3: Verified
without patch:
>>> import asyncoreReactor
>>> ar = asyncoreReactor.AsyncoreReactor()
>>> aclient = ar.createClient(("::1", 44885))
>>> aclient.connect()
gaierror Traceback (most recent call last)
/root/code/vdsm/lib/yajsonrpc/<ipython console> in <module>()
/root/code/vdsm/lib/yajsonrpc/asyncoreReactor.py in connect(self)
97
98 def connect(self):
---> 99 self._client.connect(self._client._addr)
100
101 def setInbox(self, inbox):
/usr/lib64/python2.6/asyncore.pyc in connect(self, address)
335 def connect(self, address):
336 self.connected = False
--> 337 err = self.socket.connect_ex(address)
338 # XXX Should interpret Winsock return values
339 if err in (EINPROGRESS, EALREADY, EWOULDBLOCK):
/usr/lib64/python2.6/socket.pyc in connect_ex(self, *args)
gaierror: [Errno -9] Address family for hostname not supported
with new patch:
>>> import asyncoreReactor
>>> ar = asyncoreReactor.AsyncoreReactor()
>>> aclient = ar.createClient(("::1", 44885))
>>> aclient.connect()
>>> aclient._client.socket.family
10
>>> socket.AF_INET6
10
IPv4 still works
>>> aclient4 = ar.createClient(("127.0.0.1",44885))
>>> aclient4.connect()
>>> aclient4._client.socket.family
2
>>> socket.AF_INET
2
--
To view, visit http://gerrit.ovirt.org/11740
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I108c3f804476ace8b9b1f0c5cca3f9b196d1163b
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Petr Šebek <psebek at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
More information about the vdsm-patches
mailing list