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

puppet.run issues misleading error message #27506

Closed
internetstaff opened this issue Sep 29, 2015 · 2 comments
Closed

puppet.run issues misleading error message #27506

internetstaff opened this issue Sep 29, 2015 · 2 comments
Labels
Bug broken, incorrect, or confusing behavior P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale State-Module
Milestone

Comments

@internetstaff
Copy link
Contributor

We're having a problem where puppet.run works, but prints out this error on the master:

ERROR: Minions returned with non-zero exit code

This happens when Puppet makes a change and returns a '2' instead of a 0.

In puppet.py, run() properly modifies retcode to '0' when it sees a '2', since that indicates a successful run.

However, in minion.py, _thread_return injects the original return code with this:

                ret['retcode'] = minion_instance.functions.pack['__context__'].get(
                    'retcode',
                    0
                )

'ret' ends up being changed from:

{'return': {'pid': 7197,
            'retcode': 0,
            'stderr': '',
            'stdout': "blah blah blah"},
 'success': False}

to:

{'retcode': 2,
 'return': {'pid': 7197,
            'retcode': 0,
            'stderr': '',
            'stdout': "blah blah blah"},
 'success': True}

The salt master then uses the top level 'retcode' to print the misleading error above, causing operators and programs parsing the output to incorrectly conclude there was a failure.

If I comment out the functions.pack section, everything works as expected.

@jfindlay jfindlay added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 State-Module Platform Relates to OS, containers, platform-based utilities like FS, system based apps labels Sep 29, 2015
@jfindlay jfindlay added this to the Approved milestone Sep 29, 2015
@jfindlay
Copy link
Contributor

@internetstaff, thanks for the report. This issue is related to #20850.

@stale
Copy link

stale bot commented Jan 20, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 20, 2018
@stale stale bot closed this as completed Jan 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale State-Module
Projects
None yet
Development

No branches or pull requests

2 participants