From bd0a53c8bc9a1bb86908e15c1c0310593a09c14a Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Mon, 23 Feb 2015 19:02:16 -0800 Subject: Work on getting state. Signed-off-by: Robin H. Johnson --- lib/storage.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/storage.rb b/lib/storage.rb index f47c6bc..081e206 100644 --- a/lib/storage.rb +++ b/lib/storage.rb @@ -89,7 +89,10 @@ module Ag::Storage }) # Give elasticsearch some time to process the new index - pp $es.indices.status(index: indexname) + status = $es.indices.status(index: indexname) + pp status['indices'][indexname]['shares'].map do |k,v| + v['routing']['state'] + end while $es.cluster.health['status'] != 'green' do pp $es.indices.status(index: indexname) sleep 0.01 -- cgit v1.2.3-65-gdbad