Gal Hammer has posted comments on this change.

Change subject: vdsm: Try to reconnect on vmchannel after timeout
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File vdsm/guestIF.py
Line 102:         ret = False
Line 103:         try:
Line 104:             self.log.debug("Attempting connection to %s", 
self._socketName)
Line 105:             result = self._sock.connect_ex(self._socketName)
Line 106:             if result == 0:
Are you sure that connect_ex returns an error and doesn't throw an exception?
Line 107:                 self.log.debug("Connected to %s", self._socketName)
Line 108:                 self._messageState = MessageState.NORMAL
Line 109:                 self._clearReadBuffer()
Line 110:                 self._forward('refresh')


Line 272:         if self.guestStatus not in ("Powered down", 
"RebootInProgress"):
Line 273:             self.log.log(logging.TRACE, "Guest connection timed out")
Line 274:             self.guestStatus = None
Line 275:             self.log.debug("Attempting to reconnect to channel after 
timeout")
Line 276:             self._connect()
You shouldn't do that here. The logic should be in VmChannels code 
(_handle_timeouts method). If you think that a read timeout mean that you need 
to re-connected the channel, then add the channel to the unconnected channel 
list. That way you'll be in the same code path when a new channel is connected 
and gain a connect retries.
Line 277: 
Line 278:     def _clearReadBuffer(self):
Line 279:         self._buffer = []
Line 280:         self._bufferSize = 0


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8b9b9418e39558d45c97e9545bc9ecc4935f004e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Gal Hammer <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Peter V. Saveliev <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to