Knife ssh Return Values

Hi Guys!

We’re using “knife ssh” to deploy parts of our application. It seems,
though, that knife ssh returns “0” if it can’t connect to the host:

user@chef02:/tmp$ knife ssh ‘name:MikeEnv01C1’ 'ls /etc’
MikeEnv01C1 fstab makedev.d rmt
user@chef02:/tmp$ echo $?

… and to a host which was brought down:

user@chef02:/tmp$ knife ssh ‘name:SteveEnv02C’ ‘ls /etc’

echo ? WARNING: Failed to connect to -- Errno::ETIMEDOUT: Connection timed out - connect(2) user@chef02:/tmp echo $?

user@chef02:/tmp$ knife -v
Chef: 11.4.0

Is this “As Designed”?


This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are
addressed. Please note that any disclosure, copying or distribution of the
content of this information is strictly forbidden. If you have received
this email message in error, please destroy it immediately and notify its