Fix bug with cloned image sizes

This commit is contained in:
Joshua Boniface 2021-11-29 14:56:50 -05:00
parent 8470dfaa29
commit bc49b5eca2
1 changed files with 8 additions and 2 deletions

View File

@ -1442,11 +1442,17 @@ def create_vm(
)
if not volume["pool"] in pools:
pools[volume["pool"]] = int(
volume_data["stats"]["size"].replace("G", "")
pvc_ceph.format_bytes_fromhuman(volume_data["stats"]["size"])
/ 1024
/ 1024
/ 1024
)
else:
pools[volume["pool"]] += int(
volume_data["stats"]["size"].replace("G", "")
pvc_ceph.format_bytes_fromhuman(volume_data["stats"]["size"])
/ 1024
/ 1024
/ 1024
)
else:
if not volume["pool"] in pools: