rest_connection 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rest_connection/ssh_hax.rb +1 -9
- data/lib/rest_connection/version.rb +1 -1
- metadata +4 -4
@@ -75,15 +75,7 @@ module SshHax
|
|
75
75
|
retry_count = 0
|
76
76
|
while (!success && retry_count < SSH_RETRY_COUNT) do
|
77
77
|
begin
|
78
|
-
|
79
|
-
test_ssh = ""
|
80
|
-
[5, 15, 60].each { |timeout_max|
|
81
|
-
test_ssh = `ssh -o \"BatchMode=yes\" -o \"StrictHostKeyChecking=no\" -o \"ConnectTimeout #{timeout_max}\" rightscale@#{host_dns} -C \"exit\" 2>&1`.chomp
|
82
|
-
break if test_ssh =~ /permission denied/i or test_ssh.empty?
|
83
|
-
}
|
84
|
-
raise test_ssh unless test_ssh =~ /permission denied/i or test_ssh.empty?
|
85
|
-
|
86
|
-
Net::SSH.start(host_dns, 'rightscale', :keys => ssh_key_config(ssh_key), :user_known_hosts_file => "/dev/null") do |ssh|
|
78
|
+
Net::SSH.start(host_dns, 'rightscale', :keys => ssh_key_config(ssh_key), :timeout => 60, :user_known_hosts_file => "/dev/null") do |ssh|
|
87
79
|
cmd_channel = ssh.open_channel do |ch1|
|
88
80
|
ch1.on_request('exit-status') do |ch, data|
|
89
81
|
status = data.read_long
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 8
|
10
|
+
version: 1.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- RightScale, Inc.
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-05-
|
18
|
+
date: 2013-05-28 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|