Skip to content

Fix the always-false behavior on checking state - #31745

Merged
cachedout merged 4 commits into
saltstack:2015.8from
isbm:isbm-always-minion-errcode-2-fix
Mar 15, 2016
Merged

cachedout merged 4 commits into
saltstack:2015.8from
isbm:isbm-always-minion-errcode-2-fix

Conversation

@isbm

@isbm isbm commented Mar 8, 2016

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes a problem, when you see:

"ERROR: Minions returned with non-zero exit code"

This happens when issuing state.show_highstate for example.

New Behavior

While this structure is invalid (first level is a list):

  {'host': []}

Apparently, this structure should be also valid:

  {'host': {'something': []}}

The bug was that the function is using recursion, looking for lists everywhere, hence always returns False, once anywhere a non-dict is found.

Tests written?

  • Yes
  • No

@ghost

ghost commented Mar 8, 2016

Copy link
Copy Markdown

Can one of the admins verify this patch?

@isbm isbm changed the title Fix the always-false behavior on checking state (there are always lis… Fix the always-false behavior on checking state Mar 8, 2016
@rallytime

Copy link
Copy Markdown
Contributor

Go Go Jenkins!

@rallytime

Copy link
Copy Markdown
Contributor

@cachedout A review from you here would be great, when you get a moment.

@rallytime rallytime added pending-discussion The issue or pull request needs more discussion before it can be closed or merged Tests-Passed labels Mar 10, 2016
@isbm

isbm commented Mar 11, 2016

Copy link
Copy Markdown
Contributor Author

@cachedout a review would be indeed nice. 😉

@rallytime rallytime removed the pending-discussion The issue or pull request needs more discussion before it can be closed or merged label Mar 15, 2016
cachedout pushed a commit that referenced this pull request Mar 15, 2016
Fix the always-false behavior on checking state
@cachedout
cachedout merged commit b068eaa into saltstack:2015.8 Mar 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants