elasticsearch-drain 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/drain/cli.rb +12 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4d9818b7b31d2d314ed28f115e404ad13ae7aaf
|
4
|
+
data.tar.gz: 21b822e916ca22a8868aece44bbff7a3b121218c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 027619b731ea89f94141ec4e0d1ab170435039d4729bd2d907ffb48ee290b4b19d677eab634d9cebe00f5d1b78fb638852ab03efe9ed363213bcfb3be18580c9
|
7
|
+
data.tar.gz: 726c2ca1a5c00578f69f059837f8bf4a2e2139c18dbba889d2e898ca1f254e623607ad6a05bf8a4c79d21307270a3d777764b6dfca497c691ffa1f42908c3282
|
@@ -149,16 +149,18 @@ module Elasticsearch
|
|
149
149
|
sleep_time = wait_sleep_time
|
150
150
|
nodes.each do |instance|
|
151
151
|
instance = drainer.nodes.filter_nodes([instance.ipaddress], true).first
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
152
|
+
unless instance.nil? || instance == 0
|
153
|
+
if instance.bytes_stored > 0
|
154
|
+
say_status 'Drain Status', "Node #{instance.ipaddress} has #{instance.bytes_stored} bytes to move", :blue
|
155
|
+
sleep sleep_time
|
156
|
+
else
|
157
|
+
next unless remove_node(instance)
|
158
|
+
deleted_nodes.push(nodes.find { |n| n.ipaddress == instance.ipaddress })
|
159
|
+
nodes.delete_if { |n| n.ipaddress == instance.ipaddress }
|
160
|
+
break if nodes.length < 1
|
161
|
+
say_status 'Waiting', 'Sleeping for 1 minute before removing the next node', :green
|
162
|
+
sleep 60
|
163
|
+
end
|
162
164
|
end
|
163
165
|
end
|
164
166
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-drain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08
|
11
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|