Merge pull request #50184 from ethanculler/fix-minion-return-exception-with-return

Added handling for minion return exceptions containing the word "return"
This commit is contained in:
Daniel Wallace 2018-10-26 19:16:56 -05:00 committed by GitHub
commit b94a43b09e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1283,6 +1283,13 @@ class LocalClient(object):
if raw['data']['return'] == {}:
continue
# if the minion throws an exception containing the word "return"
# the master will try to handle the string as a dict in the next
# step. Check if we have a string, log the issue and continue.
if isinstance(raw['data']['return'], six.string_types):
log.error("unexpected return from minion: %s", raw)
continue
if 'return' in raw['data']['return'] and \
raw['data']['return']['return'] == {}:
continue