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):
195
195
return "{}|{}%" .format (used_human , used_percent )
196
196
197
197
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'
203
202
204
- if attributes is not None :
203
+ if attributes is not None and roles is None :
205
204
# pre-2.3 roles
205
+ ismaster = 'true'
206
+ isdata = 'true'
206
207
isingest = 'false'
207
208
if 'data' in attributes :
208
209
isdata = attributes ['data' ]
You can’t perform that action at this time.
0 commit comments