From 68954a79eca0b6c5224ca882906aff3739a0123e Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 29 Nov 2021 14:56:50 -0500 Subject: [PATCH] Fix bug with cloned image sizes --- api-daemon/pvcapid/provisioner.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api-daemon/pvcapid/provisioner.py b/api-daemon/pvcapid/provisioner.py index bb448e6a..dc39624a 100755 --- a/api-daemon/pvcapid/provisioner.py +++ b/api-daemon/pvcapid/provisioner.py @@ -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: