Vinzenz Feenstra has uploaded a new change for review. Change subject: vdsm: Try to reconnect on vmchannel after timeout ......................................................................
vdsm: Try to reconnect on vmchannel after timeout Once a timeout occurred on the channel the socket connection might be in a disconnected state. Therefore we're trying to attempt to connect again on timeout. Change-Id: I8b9b9418e39558d45c97e9545bc9ecc4935f004e Bug-Url: https://bugzilla.redhat.com/871616 Signed-off-by: Vinzenz Feenstra <[email protected]> --- M vdsm/guestIF.py 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/11977/1 diff --git a/vdsm/guestIF.py b/vdsm/guestIF.py index 675b78e..fabbabf 100644 --- a/vdsm/guestIF.py +++ b/vdsm/guestIF.py @@ -102,13 +102,17 @@ ret = False try: self.log.debug("Attempting connection to %s", self._socketName) - if self._sock.connect_ex(self._socketName) == 0: + ret = self._sock.connect_ex(self._socketName) + if ret == 0: self.log.debug("Connected to %s", self._socketName) self._messageState = MessageState.NORMAL self._clearReadBuffer() self._forward('refresh') self._stopped = False ret = True + else: + self.log.debug("Failed to connect to %s with %d", + self._socketName, ret) except socket.error as err: self.log.debug("Connection attempt failed: %s", err) return ret @@ -268,6 +272,8 @@ if self.guestStatus not in ("Powered down", "RebootInProgress"): self.log.log(logging.TRACE, "Guest connection timed out") self.guestStatus = None + self.log.debug("Attempting to reconnect to channel after timeout") + self._connect() def _clearReadBuffer(self): self._buffer = [] -- To view, visit http://gerrit.ovirt.org/11977 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b9b9418e39558d45c97e9545bc9ecc4935f004e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vinzenz Feenstra <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
