CLOUDSTACK-8101: volume sync not working as expected - MS restart during upload volume leaves volume in hung state.

(cherry picked from commit e559b15b6a)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
This commit is contained in:
Min Chen 2014-12-19 16:48:45 -08:00 committed by Rohit Yadav
parent 1aeaf4dcc9
commit ff70ef797c
1 changed files with 2 additions and 1 deletions

View File

@ -1383,7 +1383,8 @@ public class VolumeServiceImpl implements VolumeService {
return;
}
List<VolumeDataStoreVO> dbVolumes = _volumeStoreDao.listUploadedVolumesByStoreId(storeId);
// find all the db volumes including those with NULL url column to avoid accidentally deleting volumes on image store later.
List<VolumeDataStoreVO> dbVolumes = _volumeStoreDao.listByStoreId(storeId);
List<VolumeDataStoreVO> toBeDownloaded = new ArrayList<VolumeDataStoreVO>(dbVolumes);
for (VolumeDataStoreVO volumeStore : dbVolumes) {
VolumeVO volume = volDao.findById(volumeStore.getVolumeId());