Silence warning on node list for offline nodes
authorIustin Pop <iustin@google.com>
Fri, 9 Jan 2009 12:52:28 +0000 (12:52 +0000)
committerIustin Pop <iustin@google.com>
Fri, 9 Jan 2009 12:52:28 +0000 (12:52 +0000)
The warning in node list is meant for nodes that return wrong
information, but for offline nodes this case is normal.

Reviewed-by: imsnah

lib/rpc.py

index 065da59..dd7c176 100644 (file)
@@ -578,6 +578,10 @@ class RpcRunner(object):
     for result in retux.itervalues():
       if result.failed or not isinstance(result.data, dict):
         result.data = {}
+      if result.offline:
+        log_name = None
+      else:
+        log_name = "call_node_info"
 
       utils.CheckDict(result.data, {
         'memory_total' : '-',
@@ -585,7 +589,7 @@ class RpcRunner(object):
         'memory_free' : '-',
         'vg_size' : 'node_unreachable',
         'vg_free' : '-',
-        }, "call_node_info")
+        }, log_name)
     return retux
 
   def call_node_add(self, node, dsa, dsapub, rsa, rsapub, ssh, sshpub):