salt icon indicating copy to clipboard operation
salt copied to clipboard

Non-Zero return code on successful highstate.

Open erickyellott opened this issue 13 years ago • 8 comments

Uploading the salt config files with fabric to a masterless minion and running salt-call --local state.highstate can result in a non-zero return code.

Fatal error: sudo() received nonzero return code 2 while executing!

The salt states all execute with only INFO or WARNING messages, with most warnings being:

[WARNING ] Unable to import "softwareproperties.ppa": No module named pycurl

erickyellott avatar May 14 '13 02:05 erickyellott

Wow, you're right! Weird. I'll look into it.

basepi avatar May 14 '13 22:05 basepi

Maybe if a warning is issued, we do want a non-zero exit code. But maybe softwareproperties.ppa shouldn't emit a warning? Or the ppa should be added in the salt bootstrap script or something? I'm just spitballing here.

erickyellott avatar May 14 '13 22:05 erickyellott

It only happens on a salt-call --local so that's a starting point. I'll track it down. =)

basepi avatar May 14 '13 22:05 basepi

XD. Good luck!

erickyellott avatar May 14 '13 22:05 erickyellott

This is a duplicate. It is in a function in salt/utils/init.py, I will take a look and add some stuff around returncodes

thatch45 avatar May 14 '13 23:05 thatch45

So are you fixing it, @thatch45 ? I was still trying to track down where it was setting 'retcode' in the dictionary that would be returned to salt-call.

basepi avatar May 14 '13 23:05 basepi

This looks like the duplicate.

https://github.com/saltstack/salt/issues/4904

I'll close this one.

erickyellott avatar May 14 '13 23:05 erickyellott

Thanks for tracking down the duplicate @yellottyellott :) I have passed in an initial fix for this to solve the surface problem but there is another fix on the way

thatch45 avatar May 14 '13 23:05 thatch45