mirror of https://github.com/apache/cloudstack.git
CS-18685: do not modify vo, if you don't want to store it in db afterwards, as vo is cached by default.
This commit is contained in:
parent
37f99d8ac2
commit
223b2729d7
|
|
@ -651,11 +651,8 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
|
|||
DiskOfferingVO diskOffering, List<StoragePool> avoids,
|
||||
long size, HypervisorType hyperType) {
|
||||
StoragePool pool = null;
|
||||
DiskProfile dskCh = null;
|
||||
if (diskOffering != null && diskOffering.isCustomized()) {
|
||||
dskCh.setSize(size);
|
||||
}
|
||||
|
||||
DiskProfile dskCh = null;
|
||||
if (volume.getVolumeType() == Type.ROOT
|
||||
&& Storage.ImageFormat.ISO != template.getFormat()) {
|
||||
dskCh = createDiskCharacteristics(volume, template, dc, offering);
|
||||
|
|
@ -664,6 +661,10 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
|
|||
diskOffering);
|
||||
}
|
||||
|
||||
if (diskOffering != null && diskOffering.isCustomized()) {
|
||||
dskCh.setSize(size);
|
||||
}
|
||||
|
||||
dskCh.setHyperType(hyperType);
|
||||
|
||||
final HashSet<StoragePool> avoidPools = new HashSet<StoragePool>(
|
||||
|
|
|
|||
Loading…
Reference in New Issue