ridley-connectors 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 599c5217df3e7254b4578d86c7ea5d2cff2642d2
4
- data.tar.gz: dd25c405a8e4d04d49841830d2d052ed4149a126
3
+ metadata.gz: e88e7d1466ed5f5f4eba7ab10027d7de1bab2a1a
4
+ data.tar.gz: 524114a995de24ce56a8e196116f438ad0f94c22
5
5
  SHA512:
6
- metadata.gz: 586525058a7a8db6d445f7a613a70099b6751b9d3d4958f631e680b70b58f69b97fb2ba90ec773145c4e2c063b9be9ed795e073571eacaeef009c82f04e0e907
7
- data.tar.gz: b66f344b598132790cf6b927f54af4763100a27e9bc358ac79d50b3e549152b5af9145fad8ced11c99672ff76f13bacc21c60cc4bd72530db4d262c5ecbe47bf
6
+ metadata.gz: b7f907f07d2754a34fbfa7e21dfebddb0fdc22eeeebcbc646bcd791d3ff9636cb60624eb8bc7d34b5084b2795857ff0c7dce600598f5225dcf9344b74f9d9fb7
7
+ data.tar.gz: b077c34a56b4a0f2d5631fe9e277d1bf8c716d41757011746f29dc311ca0387312da5c19e7bf4259de3a52b833f31689949a62034eb1824b7ffce468715a2c67
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v.1.7.1
2
+
3
+ * [#16](https://github.com/RiotGames/ridley-connectors/pull/16) JRuby throws different exceptions when it can't connect to a node
4
+
1
5
  ## v.1.7.0
2
6
 
3
7
  * [#15](https://github.com/RiotGames/ridley-connectors/pull/15) Add retries to ssh and winrm connections
@@ -1,10 +1,15 @@
1
+ require 'buff/ruby_engine'
2
+
1
3
  module Ridley
2
4
  class ConnectorSupervisor < ::Celluloid::SupervisionGroup
5
+ include Ridley::Logging
6
+
3
7
  # @param [Celluloid::Registry] registry
4
8
  def initialize(registry, connector_pool_size)
5
9
  super(registry)
6
10
 
7
11
  if connector_pool_size > 1
12
+ log.info { "Host ConnectorSupervisor pool starting with size: #{connector_pool_size}" }
8
13
  pool(HostConnector::SSH, size: connector_pool_size, as: :ssh)
9
14
  pool(HostConnector::WinRM, size: connector_pool_size, as: :winrm)
10
15
  else
@@ -21,6 +26,15 @@ module Ridley
21
26
  PORT_CHECK_TIMEOUT = 3
22
27
  RETRY_COUNT = 3
23
28
 
29
+ CONNECTOR_PORT_ERRORS = [
30
+ Errno::ETIMEDOUT, Timeout::Error, SocketError,
31
+ Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::EADDRNOTAVAIL
32
+ ]
33
+
34
+ if Buff::RubyEngine.jruby?
35
+ CONNECTOR_PORT_ERRORS << Java::JavaNet::ConnectException
36
+ end
37
+
24
38
  finalizer :finalize_callback
25
39
 
26
40
  def initialize(connector_pool_size=nil)
@@ -226,7 +240,7 @@ module Ridley
226
240
  defer {
227
241
  Timeout.timeout(wait_time || PORT_CHECK_TIMEOUT) { Celluloid::IO::TCPSocket.new(host, port).close; true }
228
242
  }
229
- rescue Errno::ETIMEDOUT, Timeout::Error, SocketError, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::EADDRNOTAVAIL => ex
243
+ rescue *CONNECTOR_PORT_ERRORS => ex
230
244
  @retry_count -= 1
231
245
  retry if @retry_count > 0
232
246
  false
@@ -1,5 +1,5 @@
1
1
  module Ridley
2
2
  module Connectors
3
- VERSION = '1.7.0'
3
+ VERSION = '1.7.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridley-connectors
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor