Revision 0bbec3af lib/cmdlib/instance_operation.py
b/lib/cmdlib/instance_operation.py | ||
---|---|---|
98 | 98 |
assert self.instance is not None, \ |
99 | 99 |
"Cannot retrieve locked instance %s" % self.op.instance_name |
100 | 100 |
|
101 |
cluster = self.cfg.GetClusterInfo() |
|
101 | 102 |
# extra hvparams |
102 | 103 |
if self.op.hvparams: |
103 | 104 |
# check hypervisor parameter syntax (locally) |
104 |
cluster = self.cfg.GetClusterInfo() |
|
105 | 105 |
utils.ForceDictType(self.op.hvparams, constants.HVS_PARAMETER_TYPES) |
106 | 106 |
filled_hvp = cluster.FillHV(instance) |
107 | 107 |
filled_hvp.update(self.op.hvparams) |
... | ... | |
127 | 127 |
# check bridges existence |
128 | 128 |
CheckInstanceBridgesExist(self, instance) |
129 | 129 |
|
130 |
remote_info = self.rpc.call_instance_info(instance.primary_node,
|
|
131 |
instance.name,
|
|
132 |
instance.hypervisor)
|
|
130 |
remote_info = self.rpc.call_instance_info( |
|
131 |
instance.primary_node, instance.name, instance.hypervisor,
|
|
132 |
cluster.hvparams[instance.hypervisor])
|
|
133 | 133 |
remote_info.Raise("Error checking node %s" % instance.primary_node, |
134 | 134 |
prereq=True, ecode=errors.ECODE_ENVIRON) |
135 | 135 |
if not remote_info.payload: # not running already |
... | ... | |
392 | 392 |
reboot_type = self.op.reboot_type |
393 | 393 |
reason = self.op.reason |
394 | 394 |
|
395 |
remote_info = self.rpc.call_instance_info(instance.primary_node, |
|
396 |
instance.name, |
|
397 |
instance.hypervisor) |
|
395 |
cluster = self.cfg.GetClusterInfo() |
|
396 |
remote_info = self.rpc.call_instance_info( |
|
397 |
instance.primary_node, instance.name, instance.hypervisor, |
|
398 |
cluster.hvparams[instance.hypervisor]) |
|
398 | 399 |
remote_info.Raise("Error checking node %s" % instance.primary_node) |
399 | 400 |
instance_running = bool(remote_info.payload) |
400 | 401 |
|
Also available in: Unified diff