Skip to content

Exit with ssh command's exit code #1

@solution-al

Description

@solution-al

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:

dssh -l "server1 server2" "invalid-command"
echo $?

Output of $? should be non-zero as is with running regular ssh:

ssh server1 "invalid-command"
echo $?

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions