Change in vdsm[master]: migration: Use jsonrpc during migration of vms

michal.skrivanek at redhat.com michal.skrivanek at redhat.com
Fri Mar 27 10:49:01 UTC 2015


Michal Skrivanek has posted comments on this change.

Change subject: migration: Use jsonrpc during migration of vms
......................................................................


Patch Set 5:

(4 comments)

https://gerrit.ovirt.org/#/c/36701/5/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 119:         if self.hibernating:
Line 120:             return
Line 121: 
Line 122:         # FIXME: The port will depend on the binding being used.
Line 123:         # This assumes xmlrpc
so this is not valid anymore?
Line 124:         hostPort = vdscli.cannonizeHostPort(
Line 125:             self._dst,
Line 126:             config.getint('addresses', 'management_port'))
Line 127:         self.remoteHost, port = hostPort.rsplit(':', 1)


Line 129:         try:
Line 130:             client_socket = self._createSocket(port)
Line 131:             reactor = self._vm.cif.getReactor("stomp")
Line 132:             self._destServer = jsonrpcvdscli.connect(reactor, client_socket)
Line 133:             self.log.debug('Initiating connection with destination')
why do you drop the log of host&port as in the original code? Now it's only in the except case below
Line 134:             self._destServer.ping()
Line 135: 
Line 136:         except Exception:
Line 137:             if config.getboolean('vars', 'ssl'):


Line 130:             client_socket = self._createSocket(port)
Line 131:             reactor = self._vm.cif.getReactor("stomp")
Line 132:             self._destServer = jsonrpcvdscli.connect(reactor, client_socket)
Line 133:             self.log.debug('Initiating connection with destination')
Line 134:             self._destServer.ping()
> can we factor this out in a helper function/method?
well, this whole method is a helper method...

anyway - does it do a real ping or something else? why?
Line 135: 
Line 136:         except Exception:
Line 137:             if config.getboolean('vars', 'ssl'):
Line 138:                 self._destServer = vdscli.connect(


Line 134:             self._destServer.ping()
Line 135: 
Line 136:         except Exception:
Line 137:             if config.getboolean('vars', 'ssl'):
Line 138:                 self._destServer = vdscli.connect(
so now we have an implicit fallback to XMLRPC?
Line 139:                     hostPort,
Line 140:                     useSSL=True,
Line 141:                     TransportClass=kaxmlrpclib.TcpkeepSafeTransport)
Line 142:             else:


-- 
To view, visit https://gerrit.ovirt.org/36701
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie38334e6cdcc4d7899bd5e836b3196567fc0bfd8
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list