mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Give user a reason a minion did not return
Gives the user who selects a verbose output a best guess on why the minion did not return a response.
This commit is contained in:
parent
7ea0328fef
commit
1a2ef652b4
@ -1199,13 +1199,19 @@ class LocalClient(object):
|
||||
or tgt_type in ('glob', 'pcre', 'list'):
|
||||
if len(found) < len(minions):
|
||||
fail = sorted(list(minions.difference(found)))
|
||||
for minion in fail:
|
||||
yield({
|
||||
minion: {
|
||||
'out': 'no_return',
|
||||
'ret': 'Minion did not return'
|
||||
}
|
||||
})
|
||||
# May incur heavy disk access
|
||||
connected_minions = salt.utils.minions.CkMinions(self.opts).connected_ids()
|
||||
for failed in fail:
|
||||
if connected_minions and failed not in connected_minions:
|
||||
yield {failed: {'out': 'no_return',
|
||||
'ret': 'Minion did not return. [Not connected]'}}
|
||||
else:
|
||||
yield({
|
||||
failed: {
|
||||
'out': 'no_return',
|
||||
'ret': 'Minion did not return. [No response]'
|
||||
}
|
||||
})
|
||||
break
|
||||
if time.time() > timeout_at:
|
||||
# The timeout has been reached, check the jid to see if the
|
||||
|
Loading…
Reference in New Issue
Block a user