Commit 9e946416 authored by Klaus Aehlig's avatar Klaus Aehlig Committed by Helga Velroyen
Browse files

The disk size of a diskless instance is 0, not None

For diskless instances it is still reasonable to sum up the disk usage
of all the (zero) disks, resulting in the empty sum. This uniformity
also has the advantage that iallocators (like hail) do not have to do
any special considerations for diskless instances.
Signed-off-by: default avatarKlaus Aehlig <>
Reviewed-by: default avatarHelga Velroyen <>
parent 6cb65875
......@@ -1621,7 +1621,7 @@ def ComputeDiskSize(disk_template, disks):
# Required free disk space as a function of disk and swap space
req_size_dict = {
constants.DT_DISKLESS: None,
constants.DT_DISKLESS: 0,
constants.DT_PLAIN: sum(d[constants.IDISK_SIZE] for d in disks),
# 128 MB are added for drbd metadata for each disk
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