-
Notifications
You must be signed in to change notification settings - Fork 4
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
Exit with ssh command's exit code #1
Comments
Hmm, that's a great point. It probably wouldn't be much of an issue to fix this, either. Let me take a look... |
We ran into the issue described above where one of the commands failed on one of the servers and we didn't notice it since dssh exit code was 0. Did you have time to look into this issue yet so that this problem would be fixed? |
Attempts to address #1. Exit statuses are captured and written to a temporary location (or optionally a user-specified file). We somewhat arbitrarily return the highest-numbered exit status, with the intent to avoid returning "0" (since that would signal everything worked as expected).
I pushed a potential fix for this to the 'exit-status' branch... Haven't tested it much yet, but it should propagate the exit statuses and give you a non-zero result if any of the commands returned a non-zero exit code. |
We have multiple hosts with executing long running tasks having a lot of output. We would like to exit
dssh
with non-zero exit code if any of the commands failed with non-zero exit code.For example:
Output of
$?
should be non-zero as is with running regular ssh:This is needed so that we could check for it and exit out wrapper script with non-zero exit code to hint that we should check logs to understand what went wrong in which server. Since currently
dssh
exits with code 0 it's impossible to do that.The text was updated successfully, but these errors were encountered: