Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 0.8.10, 0.8.12, 0.8.14, 0.8.16, 0.9.0, 0.9.2, 0.9.4, 0.9.6, 0.9.8
-
Fix Version/s: 0.9.10
-
Component/s: Chef Server
-
Labels:None
Description
Knife should probably skip hosts it can't ssh to for any reason (error or timeout) and continue with the others. Indicating the problem in the final output.
$ knife ssh : uptime
/usr/lib/ruby/gems/1.8/gems/net-ssh-multi-1.0.1/lib/net/ssh/multi/server.rb:191:in `new_session': root@rails0.lab (Net::SSH::AuthenticationFailed)
from /usr/lib/ruby/gems/1.8/gems/net-ssh-multi-1.0.1/lib/net/ssh/multi/session_actions.rb:37:in `join'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-multi-1.0.1/lib/net/ssh/multi/session_actions.rb:37:in `sessions'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-multi-1.0.1/lib/net/ssh/multi/session_actions.rb:37:in `each'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-multi-1.0.1/lib/net/ssh/multi/session_actions.rb:37:in `sessions'
from /usr/lib/ruby/gems/1.8/gems/net-ssh-multi-1.0.1/lib/net/ssh/multi/session_actions.rb:81:in `open_channel'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.10/lib/chef/knife/ssh.rb:98:in `ssh_command'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.10/lib/chef/knife/ssh.rb:199:in `run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.10/lib/chef/application/knife.rb:110:in `run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/knife:26
from /usr/bin/knife:19:in `load'
from /usr/bin/knife:19
Please consider this change to knife/ssh.rb :
60c60
< @session ||= Net::SSH::Multi.start(:concurrent_connections => config[:concurrency])
—
> @session ||= Net::SSH::Multi.start(:concurrent_connections => config[:concurrency], :on_error => :warn)