Change in vdsm[master]: concurrency: Vdscli uses a new HTTP conn per req.

asegurap at redhat.com asegurap at redhat.com
Mon Nov 19 23:39:09 UTC 2012


Antoni Segura Puimedon has posted comments on this change.

Change subject: concurrency: Vdscli uses a new HTTP conn per req.
......................................................................


Patch Set 1: (4 inline comments)

....................................................
Commit Message
Line 11: Keepalive. Unfortunately, this implementation detail was also what
Line 12: made the xmlrpclib's Transport be thread-safe.
Line 13: 
Line 14: This change reverts the change in Transport, thus mantaining the
Line 15: thread-safety of our python client code for unencrypted
Yes. Only plain text connections due to the fact that we inherited and overrode the connection making code of the safe transport in python 2.6 times (when they had the one connection per request implementation detail).
Line 16: communications.
Line 17: 
Line 18: Change-Id: Ifb08df759051bb340423958280e88df5792e9ed2


....................................................
File vdsm_cli/vdscli.py.in
Line 18: #
Line 19: # Refer to the README and COPYING files for full details of the license
Line 20: #
Line 21: 
Line 22: from xmlrpclib import Server, ServerProxy, Transport
Fine. I'll revert it.
Line 23: import httplib
Line 24: import subprocess
Line 25: import os
Line 26: from vdsm import SecureXMLRPCServer


Line 36:     by default when new connections are requested for a host with an existing
Line 37:     connection. This class reverts the change to avoid the concurrency
Line 38:     issues.'''
Line 39: 
Line 40:     def make_connection(self, host):
Ok. I kind of liked to make the change in behavior explicit in the docstring, but since the class name and class doc already hint it, we will be fine.
Line 41:         '''Creates a new HTTPConnection to the host.'''
Line 42:         # create a HTTP connection object from a host descriptor
Line 43:         chost, self._extra_headers, x509 = self.get_host_info(host)
Line 44:         #store the host argument along with the connection object


Line 128:         server = ServerProxy('https://%s' % addrport,
Line 129:                              transport=transport)
Line 130:     else:
Line 131:         server = Server('http://%s' % addrport,
Line 132:                         transport=SingleRequestTransport(use_datetime=0))
Some amount of fail. Fixed.
Line 133:     return server
Line 134: 
Line 135: if __name__ == '__main__':
Line 136:     print 'connecting to %s:%s ssl %s ts %s' % (d_addr, d_port,


--
To view, visit http://gerrit.ovirt.org/9329
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb08df759051bb340423958280e88df5792e9ed2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list