Commit 4b07178e authored by Jameson Rollins's avatar Jameson Rollins

additional summary status bit: ACTIVE, READY, INTENT

This adds three new summary status bits:

ACTIVE: node operation is within normal operational parameters
READY: all sub nodes are reporting OK status
INTENT: request is equal to nominal state, and not stalled

These should help improve downstream system tracking, and are particularly
useful for the IFO top node reporting of overall IFO status.
parent 975e60a4
......@@ -516,22 +516,40 @@ guardian version: {}
self.log.warning("MANAGER: reassigned, new manager: %s" % self['MANAGER'])
manager = self['MANAGER']
# set the overall summary bit
self['OK'] = self['OP'] == 'EXEC' \
and \
self['MODE'] in ['AUTO', 'MANAGED'] \
and \
self['LOAD_STATUS'] == 'DONE' \
and \
self['REQUEST'] == self['NOMINAL'] \
and \
self['STATE'] == self['NOMINAL'] \
and \
self['STATUS'] == 'DONE' \
and \
not self['ERROR'] \
and \
self['CONNECT'] == 'OK'
##########
# SUMMARY BITS
self['ACTIVE'] = \
self['OP'] == 'EXEC' \
and \
self['MODE'] in ['AUTO', 'MANAGED'] \
and \
self['LOAD_STATUS'] == 'DONE' \
and \
not self['ERROR'] \
and \
self['CONNECT'] == 'OK'
self['READY'] = \
self['ACTIVE'] \
and \
self['SUBNODES_NOT_OK'] == 0
self['INTENT'] = \
self['ACTIVE'] \
and \
self['REQUEST'] == self['NOMINAL'] \
and \
not self['STALLED']
self['OK'] = \
self['READY'] \
and \
self['INTENT'] \
and \
self['STATE'] == self['NOMINAL'] \
and \
self['STATUS'] == 'DONE'
########################################
# handle code reload requests
......
......@@ -197,7 +197,28 @@ guarddb = {
'guardbool': True,
'archive': True,
},
# node OK summary bit
# operational summary bit (OP/MODE/ERROR status nominal)
'ACTIVE': {
'type': 'enum',
'enums': ('False', 'True'),
'guardbool': True,
'archive': True,
},
# subnode summary bit (all sub nodes OK)
'READY': {
'type': 'enum',
'enums': ('False', 'True'),
'guardbool': True,
'archive': True,
},
# intent summary bit (REQUEST == NOMINAL)
'INTENT': {
'type': 'enum',
'enums': ('False', 'True'),
'guardbool': True,
'archive': True,
},
# overall summary bit (READY + INTENT + NOMINAL)
'OK': {
'type': 'enum',
'enums': ('False', 'True'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment