Skip to content

Instantly share code, notes, and snippets.

@jalons
Created September 8, 2014 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalons/dd44b6eec4f36f96c10b to your computer and use it in GitHub Desktop.
Save jalons/dd44b6eec4f36f96c10b to your computer and use it in GitHub Desktop.
diff --git salt/client/__init__.py salt/client/__init__.py
index 7a0e13f..9892bbc 100644
--- a/salt-0.17.5/salt/client/__init__.py
+++ b/salt-0.17.5/salt/client/__init__.py
@@ -44,9 +44,9 @@ import salt.utils.verify
import salt.utils.event
import salt.utils.minions
import salt.syspaths as syspaths
-from salt.exceptions import SaltInvocationError
-from salt.exceptions import EauthAuthenticationError
-
+from salt.exceptions import (
+ EauthAuthenticationError, SaltInvocationError, SaltReqTimeoutError
+)
# Try to import range from https://github.com/ytoolshed/range
HAS_RANGE = False
try:
@@ -1244,7 +1244,14 @@ class LocalClient(object):
'tcp://' + salt.utils.ip_bracket(self.opts['interface']) +
':' + str(self.opts['ret_port']),
)
- payload = sreq.send('clear', payload_kwargs)
+ try:
+ payload = sreq.send('clear', payload_kwargs)
+ except SaltReqTimeoutError:
+ log.error(
+ 'Salt request timed out. If this error persists, '
+ 'worker_threads may need to be increased.'
+ )
+ return {}
if not payload:
# The master key could have changed out from under us! Regen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment