From 426e4458110d0c3e6e709d8d1ea609566606ddef Mon Sep 17 00:00:00 2001 From: abhishek Date: Wed, 3 Nov 2010 11:10:34 -0700 Subject: [PATCH] bug 6904: during volume creation, we were NOT converting the size of the parent disk offering (which is in MB), to bytes. This is the size used to create the volume. I am adding the appropriate multipliers. Other flows like creating volume from snapshot etc should remain unaffected, as the parent volume created from the disk offering will be set right. status 6904: resolved fixed --- server/src/com/cloud/storage/StorageManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 5f7eaa1cfc4..3e30423602b 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -1697,7 +1697,8 @@ public class StorageManagerImpl implements StorageManager { if ((diskOffering == null) || !DiskOfferingVO.Type.Disk.equals(diskOffering.getType())) { throw new InvalidParameterValueException("Please specify a valid disk offering."); } - size = diskOffering.getDiskSize(); + size = (diskOffering.getDiskSize()*1024*1024);//the disk offering size is in MB, which needs to be converted into bytes + } } else { Long snapshotId = cmd.getSnapshotId();