Revision d29f52a6 lib/cmdlib/instance.py
b/lib/cmdlib/instance.py | ||
---|---|---|
1753 | 1753 |
(self.instance.name, target_node.name), |
1754 | 1754 |
errors.ECODE_STATE) |
1755 | 1755 |
|
1756 |
bep = self.cfg.GetClusterInfo().FillBE(self.instance) |
|
1756 |
cluster = self.cfg.GetClusterInfo() |
|
1757 |
bep = cluster.FillBE(self.instance) |
|
1757 | 1758 |
|
1758 | 1759 |
for idx, dsk in enumerate(self.instance.disks): |
1759 | 1760 |
if dsk.dev_type not in (constants.DT_PLAIN, constants.DT_FILE, |
... | ... | |
1764 | 1765 |
CheckNodeOnline(self, target_node.uuid) |
1765 | 1766 |
CheckNodeNotDrained(self, target_node.uuid) |
1766 | 1767 |
CheckNodeVmCapable(self, target_node.uuid) |
1767 |
cluster = self.cfg.GetClusterInfo() |
|
1768 | 1768 |
group_info = self.cfg.GetNodeGroup(target_node.group) |
1769 | 1769 |
ipolicy = ganeti.masterd.instance.CalculateGroupIPolicy(cluster, group_info) |
1770 | 1770 |
CheckTargetNodeIPolicy(self, ipolicy, self.instance, target_node, self.cfg, |
... | ... | |
1776 | 1776 |
self, target_node.uuid, "failing over instance %s" % |
1777 | 1777 |
self.instance.name, bep[constants.BE_MAXMEM], |
1778 | 1778 |
self.instance.hypervisor, |
1779 |
self.cfg.GetClusterInfo().hvparams[self.instance.hypervisor])
|
|
1779 |
cluster.hvparams[self.instance.hypervisor])
|
|
1780 | 1780 |
else: |
1781 | 1781 |
self.LogInfo("Not checking memory on the secondary node as" |
1782 | 1782 |
" instance will not be started") |
Also available in: Unified diff