diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 6979f260eb3..5c8ed807520 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -577,7 +577,6 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag return new Pair(createdVolume, details); } - @DB protected VolumeVO createVolumeFromSnapshot(VolumeVO volume, long snapshotId) { // By default, assume failure. @@ -586,25 +585,7 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag Pair volumeDetails = createVolumeFromSnapshot(volume, snapshot); createdVolume = volumeDetails.first(); - - Transaction txn = Transaction.currentTxn(); - txn.start(); - Long diskOfferingId = volume.getDiskOfferingId(); - - if (createdVolume.getPath() != null) { - Long offeringId = null; - if (diskOfferingId != null) { - DiskOfferingVO offering = _diskOfferingDao.findById(diskOfferingId); - if (offering != null && (offering.getType() == DiskOfferingVO.Type.Disk)) { - offeringId = offering.getId(); - } - } - - UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_VOLUME_CREATE, volume.getAccountId(), volume.getDataCenterId(), volume.getId(), volume.getName(), offeringId, null, - createdVolume.getSize()); - _usageEventDao.persist(usageEvent); - } - txn.commit(); + return createdVolume; }