Change in vdsm[ovirt-3.5]: protocoldetecor: SSLError handled not correctly

danken at redhat.com danken at redhat.com
Tue Jun 16 11:27:22 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: protocoldetecor: SSLError handled not correctly
......................................................................


Patch Set 5: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/42206/5//COMMIT_MSG
Commit Message:

Line 7: protocoldetecor: SSLError handled not correctly
Line 8: 
Line 9: Whenever there was ssl issue during protocol detection the code entered
Line 10: infinite loop because we haven't remove fd from pending_connections.
Line 11: It is fixed by caching SSLError reading data and clean up fd correctly.
is this the reason why it is not master branch as well? please rephrase if this is the case.

(And add a

 Label: ovirt-3.5-only

header)
Line 12: 
Line 13: 
Line 14: Change-Id: I8ea5c305b19c0a7421ea74e069c3ad02d9ffd141
Line 15: Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>


https://gerrit.ovirt.org/#/c/42206/5/vdsm/protocoldetector.py
File vdsm/protocoldetector.py:

Line 222:             return
Line 223: 
Line 224:         try:
Line 225:             data = client_socket.recv(self._required_size, socket.MSG_PEEK)
Line 226:         except (SSL.SSLError, socket.error) as e:
this is a rather awkward way to write

except SSL.SSLError:
  return
except socket.error:
  ...
Line 227:             if getattr(e, "errno", 0) not in (errno.EAGAIN, errno.EWOULDBLOCK):
Line 228:                 self.log.warning("Unable to read data: %s", e)
Line 229:                 self._remove_connection(client_socket)
Line 230:                 client_socket.close()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ea5c305b19c0a7421ea74e069c3ad02d9ffd141
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list