if constants.ADMINST_UP not in req_states:
pnode = instance.primary_node
if not lu.cfg.GetNodeInfo(pnode).offline:
- ins_l = lu.rpc.call_instance_list([pnode], [instance.hypervisor])[pnode]
+ all_hvparams = lu.cfg.GetClusterInfo().hvparams
+ ins_l = lu.rpc.call_instance_list([pnode], [instance.hypervisor],
+ all_hvparams)[pnode]
ins_l.Raise("Can't contact node %s for instance information" % pnode,
prereq=True, ecode=errors.ECODE_ENVIRON)
if instance.name in ins_l.payload:
self.feedback_fn("* checking where the instance actually runs"
" (if this hangs, the hypervisor might be in"
" a bad state)")
- ins_l = self.rpc.call_instance_list(self.all_nodes, [instance.hypervisor])
+ cluster_hvparams = self.cfg.GetClusterInfo().hvparams
+ ins_l = self.rpc.call_instance_list(self.all_nodes, [instance.hypervisor],
+ cluster_hvparams)
for node, result in ins_l.items():
result.Raise("Can't contact node %s" % node)
instance = self.instance
node = instance.primary_node
+ cluster_hvparams = self.cfg.GetClusterInfo().hvparams
node_insts = self.rpc.call_instance_list([node],
- [instance.hypervisor])[node]
+ [instance.hypervisor],
+ cluster_hvparams)[node]
node_insts.Raise("Can't get node information from %s" % node)
if instance.name not in node_insts.payload:
"Returns information about all instances on the given nodes"),
("instance_list", MULTI, None, constants.RPC_TMO_URGENT, [
("hypervisor_list", None, "Hypervisors to query for instances"),
+ ("hvparams", None, "Hvparams of all hypervisors"),
], None, None, "Returns the list of running instances on the given nodes"),
("instance_reboot", SINGLE, None, constants.RPC_TMO_NORMAL, [
("inst", ED_INST_DICT, "Instance object"),
"""Query the list of running instances.
"""
- return backend.GetInstanceList(params[0])
+ (hypervisor_list, hvparams) = params
+ return backend.GetInstanceList(hypervisor_list, hvparams)
# node --------------------------