Commit f241763d authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

For instances use the real instance disk template

...instead of assuming there is a single template that fits all
instances of the cluster.
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarHrvoje Ribicic <>
parent 5db01b7c
......@@ -518,8 +518,7 @@ class IAllocator(object):
assert len(data["nodes"]) == len(ninfo), \
"Incomplete node data computed"
data["instances"] = self._ComputeInstanceData(cfg, cluster_info, i_list,
data["instances"] = self._ComputeInstanceData(cfg, cluster_info, i_list)
self.in_data = data
......@@ -757,7 +756,7 @@ class IAllocator(object):
return node_results
def _ComputeInstanceData(cfg, cluster_info, i_list, disk_template):
def _ComputeInstanceData(cfg, cluster_info, i_list):
"""Compute global instance data.
......@@ -776,6 +775,7 @@ class IAllocator(object):
nic_dict["bridge"] = filled_params[constants.NIC_LINK]
inst_disks = cfg.GetInstanceDisks(iinfo.uuid)
inst_disktemplate = cfg.GetInstanceDiskTemplate(iinfo.uuid)
pir = {
"tags": list(iinfo.GetTags()),
"admin_state": iinfo.admin_state,
......@@ -792,7 +792,7 @@ class IAllocator(object):
constants.IDISK_MODE: dsk.mode,
constants.IDISK_SPINDLES: dsk.spindles}
for dsk in inst_disks],
"disk_template": disk_template,
"disk_template": inst_disktemplate,
"disks_active": iinfo.disks_active,
"hypervisor": iinfo.hypervisor,
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