I would like to see salt give well-defined exit codes that are described in the man.1 page. Looking through the code base, it appears that sometimes salt exits with -1, 1, 2, or 42 -- and it's unclear when it exits with which. Other times salt exits by raising SaltSystemExit (on one occasion passing code=42). And sometimes an outputter will print an error but has no mechanism for passing an error state back the calling function, giving an error on screen but an exit code of 0.
I would like to see a clear reason for each exit code. I would also like to have a way for error information to propagate back through the call stack so that system exits can be consolidated to a single class.
I would like to see salt give well-defined exit codes that are described in the man.1 page. Looking through the code base, it appears that sometimes salt exits with -1, 1, 2, or 42 -- and it's unclear when it exits with which. Other times salt exits by raising SaltSystemExit (on one occasion passing code=42). And sometimes an outputter will print an error but has no mechanism for passing an error state back the calling function, giving an error on screen but an exit code of 0.
I would like to see a clear reason for each exit code. I would also like to have a way for error information to propagate back through the call stack so that system exits can be consolidated to a single class.