Non-Zero return code on successful highstate.
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
Wow, you're right! Weird. I'll look into it.
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.
It only happens on a salt-call --local so that's a starting point. I'll track it down. =)
XD. Good luck!
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
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.
This looks like the duplicate.
https://github.com/saltstack/salt/issues/4904
I'll close this one.
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