File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -195,14 +195,15 @@ def get_disk_usage(self, node_fs_stats):
195195 return "{}|{}%" .format (used_human , used_percent )
196196
197197 def get_role (self , attributes = None , roles = None ):
198- # This is dumb, but if data/master is true, ES doesn't include the key in
199- # the attributes subdoc. Why?? :-P
200- ismaster = 'true'
201- isdata = 'true'
202- isingest = 'true'
198+ # TODO: A bit of a hack I'm not proud of
199+ ismaster = 'false'
200+ isdata = 'false'
201+ isingest = 'false'
203202
204- if attributes is not None :
203+ if attributes is not None and roles is None :
205204 # pre-2.3 roles
205+ ismaster = 'true'
206+ isdata = 'true'
206207 isingest = 'false'
207208 if 'data' in attributes :
208209 isdata = attributes ['data' ]
You can’t perform that action at this time.
0 commit comments