cea-hpc/clustershell — Issue #74: nodeset: improve error handling
Author: thiell
Created: 2012-03-03 16:46:35+00:00
State: open
Labels: Scripts

Improve nodeset error handling when callbacks are not well defined.

Also improve error handling for the following issues:
{{{
# nodeset -l | nodeset -r -f
ERROR: multiple commands not allowed
Try....
close failed in file object destructor:
Error in sys.excepthook:
Original exception was:
}}}

{{{
# clush -g puppet:kvm virsh list
Traceback (most recent call last):
File "/usr/bin/clush", line 818, in
clush_main(sys.argv)
File "/usr/bin/clush", line 688, in clush_main
addingrp = NodeSet("@" + grp)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeSet.py", line 1372, in __init__
self.update(nodes)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeSet.py", line 1551, in update
ns = self._parser.parse(other, self._autostep)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeSet.py", line 1175, in parse
return self.parse_string(str(nsobj), autostep)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeSet.py", line 1194, in parse_string
ns_string_ext = self.parse_group_string(nodegroup)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeSet.py", line 1222, in parse_group_string
return ",".join(self.group_resolver.group_nodes(group, namespace))
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeUtils.py", line 224, in group_nodes
source = self._source(namespace)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeUtils.py", line 313, in _source
return GroupResolver._source(self, namespace or self.default_namespace)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeUtils.py", line 217, in _source
raise GroupResolverSourceError("%s" % namespace)
ClusterShell.NodeUtils.GroupResolverSourceError: puppet
}}}