Merge pull request #976 from ustcweizhou/CLOUDSTACK-8964-removed-volume

CLOUDSTACK-8964: Can't create volume from snapshot of a removed volumeThis issue happens on KVM as well.
This is because the volume info is missing in the CopyCommand once the volume has been removed.
When the KVM agent tries to process the command, it will throws a NPE.

* pr/976:
  CLOUDSTACK-8964: Can't create volume from snapshot of a removed volume

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2015-10-25 21:25:43 +01:00
commit 7d73e9bfaf
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ public class VolumeDataFactoryImpl implements VolumeDataFactory {
@Override
public VolumeInfo getVolume(long volumeId) {
VolumeVO volumeVO = volumeDao.findById(volumeId);
VolumeVO volumeVO = volumeDao.findByIdIncludingRemoved(volumeId);
if (volumeVO == null) {
return null;
}