Commit 91ace186 authored by Jameson Rollins's avatar Jameson Rollins

Merge branch 'master' into debian

parents c3cef9dc a487ec30
......@@ -143,7 +143,7 @@ def main():
for chan in sorted(db.guarddb):
channel = const.CAS_PREFIX_FMT.format(IFO=ifo, SYSTEM=name) + chan
flag = ''
if guarddb[chan].get('archive'):
if db.guarddb[chan].get('archive'):
flag = '*'
print('{} {}'.format(channel, flag))
sys.exit()
......
__version__ = '1.3.2'
__version__ = '1.3.3'
......@@ -141,20 +141,6 @@ def draw_graph(args):
path = (args.state, args.request)
else:
path = (args.state,)
if args.query:
try:
from guardian.manager import Node, NodeConnectError
except ImportError as e:
sys.exit("Node query not supported: %s" % e)
try:
node = Node(system.name)
node.init()
except NodeConnectError as e:
sys.exit("CA error: %s" % e)
if node.request == 'NONE':
path = (node.state,)
else:
path = (node.state, node.request)
for state in path:
if state not in system:
sys.exit("State '%s' not defined in system %s." % (state, system.name))
......@@ -221,8 +207,6 @@ p.add_argument('-a', '--all', action='store_true',
help="show all edges (-gj)")
p.add_argument('-c', '--constraints', action='store_true',
help="use edge constraints for goto and jump edges")
p.add_argument('-q', '--query', action='store_true',
help="query via EPICS for <state> and <request> from running guard node for highlighting path")
p.add_argument('-f', '--format', metavar='<type>', type=str,
help="drawing format: 'pdf', 'svg', etc. (default: 'pdf')")
p.add_argument('-o', '--outfile', metavar='<path>', type=str, nargs='?', default=False,
......
......@@ -6,9 +6,6 @@ from .state import GuardStateDecorator
class NodeError(Exception):
pass
class NodeConnectError(Exception):
pass
def node_checker(node_manager, fail_return=None):
"""Return GuardStateDecorator for checking fault status of Nodes.
......
......@@ -21,7 +21,6 @@ from ezca import Ezca, EzcaError, EzcaConnectError
from .db import WORKER_STATUS
from .log import StateLogger
from .shmem import SharedMemEnum, SharedMemString
from .manager import NodeConnectError
from .const import USERMSG_STRING_LENGTH, USERMSG_COUNT, STATE_NAME_LENGTH, SPM_DIFF_COUNT
############################################################
......@@ -448,17 +447,22 @@ class Worker(multiprocessing.Process):
continue
# CHECK MANAGER SUBORDINATES
subnodes_total = set()
subnodes_not_ok = set()
for mngr in self._system.node_managers:
# make sure all nodes are initialized (node.init() is idempotent)
mngr.init()
# count subordinates nodes
subnodes_total |= set(mngr.nodes.keys())
subnodes_not_ok |= mngr.not_ok()
# FIXME: should we be running check_fault() here?
self['SUBNODES_TOTAL'] = len(subnodes_total)
self['SUBNODES_NOT_OK'] = len(subnodes_not_ok)
try:
subnodes_total = set()
subnodes_not_ok = set()
for mngr in self._system.node_managers:
# make sure all nodes are initialized (node.init() is idempotent)
mngr.init()
# count subordinates nodes
subnodes_total |= set(mngr.nodes.keys())
subnodes_not_ok |= mngr.not_ok()
# FIXME: should we be running check_fault() here?
self['SUBNODES_TOTAL'] = len(subnodes_total)
self['SUBNODES_NOT_OK'] = len(subnodes_not_ok)
except EzcaConnectError as e:
self._usernotify("EZCA CONNECTION ERROR: %s" % e)
self['STATUS'] = 'CERROR'
continue
##############################
##############################
......@@ -488,10 +492,6 @@ class Worker(multiprocessing.Process):
self._usernotify("EZCA CONNECTION ERROR: %s" % e)
self['STATUS'] = 'CERROR'
continue
except NodeConnectError as e:
self._usernotify("NODE CONNECTION ERROR: %s" % e)
self['STATUS'] = 'CERROR'
continue
except KeyboardInterrupt:
raise SystemExit
except:
......
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