mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-3716:NPE triggered in DownloadListener
This commit is contained in:
parent
7974dfe8db
commit
181fb03e7e
@ -1045,6 +1045,11 @@ public class VolumeServiceImpl implements VolumeService {
|
||||
List<VolumeDataStoreVO> toBeDownloaded = new ArrayList<VolumeDataStoreVO>(dbVolumes);
|
||||
for (VolumeDataStoreVO volumeStore : dbVolumes) {
|
||||
VolumeVO volume = _volumeDao.findById(volumeStore.getVolumeId());
|
||||
if (volume == null ){
|
||||
s_logger.warn("Volume_store_ref shows that volume " + volumeStore.getVolumeId() + " is on image store " + storeId
|
||||
+ ", but the volume is not found in volumes table, potentially some bugs in deleteVolume, so we just treat this volume to be deleted");
|
||||
continue;
|
||||
}
|
||||
// Exists then don't download
|
||||
if (volumeInfos.containsKey(volume.getId())) {
|
||||
TemplateProp volInfo = volumeInfos.remove(volume.getId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user