Revision 83d92ad8 lib/cmdlib.py

b/lib/cmdlib.py
1811 1811
    # level), so that nodes with a non-responding node daemon don't
1812 1812
    # make all OSes invalid
1813 1813
    good_nodes = [node_name for node_name in rlist
1814
                  if not rlist[node_name].failed]
1815
    for node_name, nr in rlist.iteritems():
1816
      if nr.failed or not nr.data:
1814
                  if not rlist[node_name].RemoteFailMsg()]
1815
    for node_name, nr in rlist.items():
1816
      if nr.RemoteFailMsg() or not nr.payload:
1817 1817
        continue
1818
      for os_obj in nr.data:
1818
      for os_serialized in nr.payload:
1819
        os_obj = objects.OS.FromDict(os_serialized)
1819 1820
        if os_obj.name not in all_os:
1820 1821
          # build a list of nodes for this os containing empty lists
1821 1822
          # for each node in node_list
......
1831 1832
    """
1832 1833
    valid_nodes = [node for node in self.cfg.GetOnlineNodeList()]
1833 1834
    node_data = self.rpc.call_os_diagnose(valid_nodes)
1834
    if node_data == False:
1835
      raise errors.OpExecError("Can't gather the list of OSes")
1836 1835
    pol = self._DiagnoseByOS(valid_nodes, node_data)
1837 1836
    output = []
1838
    for os_name, os_data in pol.iteritems():
1837
    for os_name, os_data in pol.items():
1839 1838
      row = []
1840 1839
      for field in self.op.output_fields:
1841 1840
        if field == "name":

Also available in: Unified diff