-
-
Save jalons/dd44b6eec4f36f96c10b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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