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:
charles_paclat 2016-03-24 19:18:50 -04:00
parent bdd7ea89d5
commit 72c5d12d43

View File

@ -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: