Nir Soffer has posted comments on this change. Change subject: json-rpc: Protocol detection ......................................................................
Patch Set 27: Code-Review+1 (2 comments) I reviewed only the code related to protocol detection and xmlrpc, and I belive that this should work without introducing regressions. I don't have any idea about the jsonrpc part, not very important at this point. There are lot of minor issues that we can fix later. http://gerrit.ovirt.org/#/c/26300/27/vdsm/protocolDetector.py File vdsm/protocolDetector.py: Line 60: def _set_non_blocking(self, fd): Line 61: flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0) Line 62: flags = flags | os.O_NONBLOCK Line 63: fcntl.fcntl(fd, fcntl.F_SETFL, flags) Line 64: utils.closeOnExec(fd) This works, but evil - the user of this method does not have any clue that you set the closeonexec flag. This should be called separately once for each fd. Not critical. Line 65: Line 66: @traceback(on=log.name) Line 67: def serve_forever(self): Line 68: self.log.debug("Acceptor running") Line 189: host, port = client_socket.getpeername() Line 190: self.log.debug("Detected protocol %s from %s:%d", Line 191: handler.name, host, port) Line 192: handler.handleSocket(client_socket, Line 193: (host, port)) Line break unneeded (minor) Line 194: Line 195: def _create_socket(self, host, port): Line 196: addr = socket.getaddrinfo(host, port, socket.AF_INET, Line 197: socket.SOCK_STREAM) -- To view, visit http://gerrit.ovirt.org/26300 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75 Gerrit-PatchSet: 27 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches