Skip to content

Commit 37f99d8

Browse files
committed
CS-18685: do not modify vo, if you don't want to store it in db afterwards, as vo is cached by default.
1 parent e65dbbc commit 37f99d8

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎server/src/com/cloud/storage/VolumeManagerImpl.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,11 @@ public VolumeInfo createVolume(VolumeInfo volume, VMInstanceVO vm,
651651
DiskOfferingVO diskOffering, List<StoragePool> avoids,
652652
long size, HypervisorType hyperType) {
653653
StoragePool pool = null;
654-
654+
DiskProfile dskCh = null;
655655
if (diskOffering != null && diskOffering.isCustomized()) {
656-
diskOffering.setDiskSize(size);
656+
dskCh.setSize(size);
657657
}
658658

659-
DiskProfile dskCh = null;
660659
if (volume.getVolumeType() == Type.ROOT
661660
&& Storage.ImageFormat.ISO != template.getFormat()) {
662661
dskCh = createDiskCharacteristics(volume, template, dc, offering);

0 commit comments

Comments
 (0)