Skip to content

Commit cc99a83

Browse files
committed
CLOUDSTACK-3716:NPE triggered in DownloadListener.
1 parent 181fb03 commit cc99a83

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,9 @@ public void handleVolumeSync(DataStore store) {
10471047
VolumeVO volume = _volumeDao.findById(volumeStore.getVolumeId());
10481048
if (volume == null ){
10491049
s_logger.warn("Volume_store_ref shows that volume " + volumeStore.getVolumeId() + " is on image store " + storeId
1050-
+ ", but the volume is not found in volumes table, potentially some bugs in deleteVolume, so we just treat this volume to be deleted");
1050+
+ ", but the volume is not found in volumes table, potentially some bugs in deleteVolume, so we just treat this volume to be deleted and mark it as destroyed");
1051+
volumeStore.setDestroyed(true);
1052+
_volumeStoreDao.update(volumeStore.getId(), volumeStore);
10511053
continue;
10521054
}
10531055
// Exists then don't download

0 commit comments

Comments
 (0)