mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 9 additions and 5 deletions
|
@ -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…
Add table
Reference in a new issue