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:
Edison Su 2013-12-19 10:49:24 -08:00
parent e65dbbc3cf
commit 37f99d8ac2
1 changed files with 2 additions and 3 deletions

View File

@ -651,12 +651,11 @@ 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()) {
diskOffering.setDiskSize(size);
dskCh.setSize(size);
}
DiskProfile dskCh = null;
if (volume.getVolumeType() == Type.ROOT
&& Storage.ImageFormat.ISO != template.getFormat()) {
dskCh = createDiskCharacteristics(volume, template, dc, offering);