Commit 74f258b6 authored by Iustin Pop's avatar Iustin Pop
Browse files

NodeQuery: don't query non-vm_capable nodes



Because non-vm_capable nodes most likely don't have a hypervisor
configured and/or storage, so the call will fail anyway.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 4fbd5444
......@@ -3630,7 +3630,10 @@ class _NodeQuery(_QueryBase):
# Gather data as requested
if query.NQ_LIVE in self.requested_data:
node_data = lu.rpc.call_node_info(nodenames, lu.cfg.GetVGName(),
# filter out non-vm_capable nodes
toquery_nodes = [name for name in nodenames if all_info[name].vm_capable]
node_data = lu.rpc.call_node_info(toquery_nodes, lu.cfg.GetVGName(),
lu.cfg.GetHypervisorType())
live_data = dict((name, nresult.payload)
for (name, nresult) in node_data.items()
......
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