Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return code of puppet module #43765

Merged

Conversation

BenjaminSchiborr
Copy link

What does this PR do?

Successful puppet return codes are 0 and 2. When return code
is 2 salt will fail. puppet.py intercepted that for the json return,
however, the salt job will still fail, because it only parses the return
code of the actual process. This commit changes the actual process to
return 0 for 0 and 2.

What issues does this PR fix or reference?

Fixes #43762

Previous Behavior

When puppet returns with a successful return code 2, the CLI output shows retcode 0. However, the salt call would still fail

New Behavior

When puppet returns with a successful return code 2, the CLI output shows retcode 0. The salt call will be successful.

Tests written?

No

Fixes saltstack#43762. Successful puppet return codes are 0 and 2. When return code
is 2 salt will fail. puppet.py intercepted that for the json return,
however, the salt job will still fail, because it only parses the return
code of the actual process. This commit changes the actual process to
return 0 for 0 and 2.
@garethgreenaway garethgreenaway merged commit 0d72edf into saltstack:develop Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Salt minions exit with non-zero exit code for Puppet run even though puppet returned successfully.
2 participants