nat-monitor 1.0.3 → 1.0.4

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: cc5453c875831f788ff05ee01c311dd752d33a0a
4
- data.tar.gz: 7fd1c80156f4cada2f45688428691a84685493bf
3
+ metadata.gz: 96266f7df21b17e73bb5e3098be0de032f0080b5
4
+ data.tar.gz: a2f089c9f8016888d84074e22e46d38c1f860aab
5
5
  SHA512:
6
- metadata.gz: d97026d5e716e0b7a146bc66c7f37a3807efa51b31cda8f3c1dbd2f12c743b8cbacf87ffd97ac6beae670a8a78f35b3a91d96cdb1417f2916023ed91bcd6cb8a
7
- data.tar.gz: 4e108d5ce4cd7db2c7fbd4574653691d8c85c8a9dc2586800fbdaedf5a4e07f86ffa0e09a32f05eaea0f65085f4ba3eb90c1d8f27d606b07334f42ee67e92c7e
6
+ metadata.gz: 7bb34f688bcec87cc4796b7c613296e7c963218c8d5146ebcb2424a6020453c3e61919170422533f53a585a587d1c783ac6ace1cb081cf3e2086eba6ef9e9f09
7
+ data.tar.gz: 413a9df75687757fd64e2d835b73a6804c430b8d3138d5371610a78c702cd5c794694cffa1596477609df6668c41b2d02e29afdcec807b82ddffe1a030a90452
@@ -51,10 +51,21 @@ module EtTools
51
51
  end
52
52
 
53
53
  def heartbeat
54
- return if am_i_master?
54
+ if am_i_master?
55
+ output "Looks like I'm the master"
56
+ return
57
+ end
55
58
  un = unreachable_nodes
56
- return if (un.count == other_nodes.keys.count) || # Next if I'm unreachable...
57
- !un.include?(current_master) # ...unless master is unreachable
59
+ return if un.empty?
60
+ if un.count == other_nodes.keys.count # return if I'm unreachable...
61
+ output "No nodes are reachable. Seems I'm the unreachable one."
62
+ return
63
+ end
64
+ cm = current_master
65
+ unless un.include?(cm) # ...unless master is unreachable
66
+ output "current master (#{cm}) is still reachable"
67
+ return
68
+ end
58
69
  steal_route
59
70
  end
60
71
 
@@ -1,5 +1,5 @@
1
1
  module EtTools
2
2
  class NatMonitor
3
- VERSION = '1.0.3'
3
+ VERSION = '1.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nat-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Herot