-
Notifications
You must be signed in to change notification settings - Fork 2k
Bail on failed SSH command with information about what failed #1501
Conversation
We can't just test for the exit code directly? |
@prologic There's no cross platform way to do so that I am aware of (see http://stackoverflow.com/questions/10385551/get-exit-code-go, for instance). |
7358005
to
925e2f7
Compare
Hmm I find this quite surpsingly really See Popen.returncode -- Unless the Python standard library has been lying to me this whole time! |
Go really has no platform independent way of returning the exit status of a subprocess? |
AFAICT not really. There are some "hack-arounds", and it's fairly easy to tell whether a process failed or succeeded, but I think the actual numeric codes are fairly platform-specific. |
Weird but okay :) James Mills / prologic E: prologic@shortcircuit.net.au On Wed, Jul 15, 2015 at 11:29 AM, Nathan LeClaire notifications@github.com
|
Nice! Might be worth explaining a little clearer what's going on to make it less scary: "Machine ran a command on a host using SSH and it failed:" Does the upstream error also explain how you might recover from this? (e.g. remove the host and try creating it again) |
cc @ehazlett --- I'm not sure about this exact output format but I really want to get this in for the next release as our failing SSH commands right now and not spitting out much that's useful. |
I think we can tweak the output later. I agree it would be great to have this soon. LGTM |
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
925e2f7
to
6db8214
Compare
Pending Travis, LGTM. Should work with native and external SSH both. |
LGTM |
Bail on failed SSH command with information about what failed
@ehazlett @bfirsh @prologic WDYT?
Closes #1266
Signed-off-by: Nathan LeClaire nathan.leclaire@gmail.com