mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
fixes 32108
Catches the case where a state returns a result that is a string indicating the state failed. The original case was one in which the state was already running on the targeted minion.
This commit is contained in:
parent
bdd7ea89d5
commit
72c5d12d43
@ -269,11 +269,15 @@ def state(
|
||||
fail.add(minion)
|
||||
failures[minion] = m_ret and m_ret or 'Minion did not respond'
|
||||
continue
|
||||
for state_item in six.itervalues(m_ret):
|
||||
if state_item['changes']:
|
||||
changes[minion] = m_ret
|
||||
break
|
||||
else:
|
||||
try:
|
||||
for state_item in six.itervalues(m_ret):
|
||||
if 'changes' in state_item and state_item['changes']:
|
||||
changes[minion] = m_ret
|
||||
break
|
||||
else:
|
||||
no_change.add(minion)
|
||||
except AttributeError:
|
||||
log.error("m_ret did not have changes %s %s", type(m_ret), m_ret)
|
||||
no_change.add(minion)
|
||||
|
||||
if changes:
|
||||
|
Loading…
Reference in New Issue
Block a user