mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Fix nodehealth silently ignoring errors
nodehealth command did not act on errors. Add a clause to handle that data.
This commit is contained in:
parent
17b5d5a816
commit
27437048a6
@ -50,6 +50,10 @@ for health in session.read('/noderange/{0}/health/hardware'.format(noderange)):
|
||||
continue
|
||||
health = health['databynode']
|
||||
for node in health:
|
||||
if 'error' in health[node]:
|
||||
sys.stderr.write('{0}: Error: {1}\n'.format(
|
||||
node, health[node]['error']))
|
||||
exitcode |= 1
|
||||
if 'health' in health[node]:
|
||||
healthbynode[node] = health[node]['health']['value']
|
||||
if 'sensors' in health[node]:
|
||||
|
Loading…
Reference in New Issue
Block a user