assert self.instance is not None, \
"Cannot retrieve locked instance %s" % self.op.instance_name
+ cluster = self.cfg.GetClusterInfo()
# extra hvparams
if self.op.hvparams:
# check hypervisor parameter syntax (locally)
- cluster = self.cfg.GetClusterInfo()
utils.ForceDictType(self.op.hvparams, constants.HVS_PARAMETER_TYPES)
filled_hvp = cluster.FillHV(instance)
filled_hvp.update(self.op.hvparams)
# check bridges existence
CheckInstanceBridgesExist(self, instance)
- remote_info = self.rpc.call_instance_info(instance.primary_node,
- instance.name,
- instance.hypervisor)
+ remote_info = self.rpc.call_instance_info(
+ instance.primary_node, instance.name, instance.hypervisor,
+ cluster.hvparams[instance.hypervisor])
remote_info.Raise("Error checking node %s" % instance.primary_node,
prereq=True, ecode=errors.ECODE_ENVIRON)
if not remote_info.payload: # not running already
reboot_type = self.op.reboot_type
reason = self.op.reason
- remote_info = self.rpc.call_instance_info(instance.primary_node,
- instance.name,
- instance.hypervisor)
+ cluster = self.cfg.GetClusterInfo()
+ remote_info = self.rpc.call_instance_info(
+ instance.primary_node, instance.name, instance.hypervisor,
+ cluster.hvparams[instance.hypervisor])
remote_info.Raise("Error checking node %s" % instance.primary_node)
instance_running = bool(remote_info.payload)
@rtype: dict
"""
- hyper = hypervisor.GetHypervisorClass(instance.hypervisor)
+ hyper = hypervisor.GetHypervisor(instance.hypervisor)
# beparams and hvparams are passed separately, to avoid editing the
# instance and then saving the defaults in the instance itself.
hvparams = cluster.FillHV(instance)