Revision 94a02bb5
b/lib/cmdlib.py | ||
---|---|---|
1587 | 1587 |
|
1588 | 1588 |
""" |
1589 | 1589 |
node_list = self.acquired_locks[locking.LEVEL_NODE] |
1590 |
node_data = self.rpc.call_os_diagnose(node_list) |
|
1590 |
valid_nodes = [node for node in self.cfg.GetOnlineNodeList() |
|
1591 |
if node in node_list] |
|
1592 |
node_data = self.rpc.call_os_diagnose(valid_nodes) |
|
1591 | 1593 |
if node_data == False: |
1592 | 1594 |
raise errors.OpExecError("Can't gather the list of OSes") |
1593 |
pol = self._DiagnoseByOS(node_list, node_data)
|
|
1595 |
pol = self._DiagnoseByOS(valid_nodes, node_data)
|
|
1594 | 1596 |
output = [] |
1595 | 1597 |
for os_name, os_data in pol.iteritems(): |
1596 | 1598 |
row = [] |
b/lib/config.py | ||
---|---|---|
787 | 787 |
return self._UnlockedGetNodeList() |
788 | 788 |
|
789 | 789 |
@locking.ssynchronized(_config_lock, shared=1) |
790 |
def GetOnlineNodeList(self): |
|
791 |
"""Return the list of nodes which are online. |
|
792 |
|
|
793 |
""" |
|
794 |
all_nodes = [self._UnlockedGetNodeInfo(node) |
|
795 |
for node in self._UnlockedGetNodeList()] |
|
796 |
return [node.name for node in all_nodes if not node.offline] |
|
797 |
|
|
798 |
@locking.ssynchronized(_config_lock, shared=1) |
|
790 | 799 |
def GetAllNodesInfo(self): |
791 | 800 |
"""Get the configuration of all nodes. |
792 | 801 |
|
Also available in: Unified diff