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 <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Hunt Xu <[email protected]>
Gerrit-Reviewer: Petr Šebek <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to