Skip to content

Commit ff70ef7

Browse files
minchen07yadvr
authored andcommitted
CLOUDSTACK-8101: volume sync not working as expected - MS restart during upload volume leaves volume in hung state.
(cherry picked from commit e559b15) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> Conflicts: engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
1 parent 1aeaf4d commit ff70ef7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,8 @@ public void handleVolumeSync(DataStore store) {
13831383
return;
13841384
}
13851385

1386-
List<VolumeDataStoreVO> dbVolumes = _volumeStoreDao.listUploadedVolumesByStoreId(storeId);
1386+
// find all the db volumes including those with NULL url column to avoid accidentally deleting volumes on image store later.
1387+
List<VolumeDataStoreVO> dbVolumes = _volumeStoreDao.listByStoreId(storeId);
13871388
List<VolumeDataStoreVO> toBeDownloaded = new ArrayList<VolumeDataStoreVO>(dbVolumes);
13881389
for (VolumeDataStoreVO volumeStore : dbVolumes) {
13891390
VolumeVO volume = volDao.findById(volumeStore.getVolumeId());

0 commit comments

Comments
 (0)