Dudi Maroshi has uploaded a new change for review. Change subject: hosted-engine: hosted-engine client, with storage connection timeout ......................................................................
hosted-engine: hosted-engine client, with storage connection timeout When a hosted engine client is requesting status from hosted engine and there is no connection to storage domain. The client is hanging indefinalty, waiting for response from the hosted-engine-broker. The fix is add timeout for calling storage domain information. In lib.brokerlink.set_storage_domain Change-Id: I3be8d3cff0912c7a88ebb00145a17fa6dd2d892d Bug-Url: http://bugzilla.redhat.com/1208489 Signed-off-by: Dudi Maroshi <d...@redhat.com> --- M ovirt_hosted_engine_ha/lib/brokerlink.py 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-ha refs/changes/92/40392/1 diff --git a/ovirt_hosted_engine_ha/lib/brokerlink.py b/ovirt_hosted_engine_ha/lib/brokerlink.py index f740490..50f6fb8 100644 --- a/ovirt_hosted_engine_ha/lib/brokerlink.py +++ b/ovirt_hosted_engine_ha/lib/brokerlink.py @@ -169,7 +169,12 @@ request = " ".join(request) try: + prevTimeout = self._socket.gettimeout(); + self._socket.settimeout(10) + self._log.debug("Set socket timeout = %d", 10) response = self._checked_communicate(request) + self._socket.settimeout(prevTimeout) + self._log.debug("Reset socket timeout = %d", prevTimeout) except Exception as e: raise RequestError("Failed to set storage domain {0}, " "options {1}: {2}" -- To view, visit https://gerrit.ovirt.org/40392 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3be8d3cff0912c7a88ebb00145a17fa6dd2d892d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-ha Gerrit-Branch: master Gerrit-Owner: Dudi Maroshi <d...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches