cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yvsubhash <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...
Date Mon, 06 Mar 2017 09:41:17 GMT
Github user yvsubhash commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r104374914
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2263,27 +2264,43 @@ public void cleanupDownloadUrls(){
     
             // Cleanup expired volume URLs
             List<VolumeDataStoreVO> volumesOnImageStoreList = _volumeStoreDao.listVolumeDownloadUrls();
    +        HashSet<Long> expiredVolumeIds = new HashSet<Long>();
    +        HashSet<Long> activeVolumeIds = new HashSet<Long>();
             for(VolumeDataStoreVO volumeOnImageStore : volumesOnImageStoreList){
     
    +            long volumeId = volumeOnImageStore.getVolumeId();
                 try {
                     long downloadUrlCurrentAgeInSecs = DateUtil.getTimeDifference(DateUtil.now(),
volumeOnImageStore.getExtractUrlCreated());
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){
 // URL hasnt expired yet
    +                    activeVolumeIds.add(volumeId);
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl()
+ " for volume id " + volumeOnImageStore.getVolumeId());
    +                expiredVolumeIds.add(volumeId);
    +                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl()
+ " for volume id " + volumeId);
     
                     // Remove it from image store
                     ImageStoreEntity secStore = (ImageStoreEntity) _dataStoreMgr.getDataStore(volumeOnImageStore.getDataStoreId(),
DataStoreRole.Image);
                     secStore.deleteExtractUrl(volumeOnImageStore.getInstallPath(), volumeOnImageStore.getExtractUrl(),
Upload.Type.VOLUME);
     
    +                _snapshotStoreDao.findByVolume(volumeId, DataStoreRole.Image);
    --- End diff --
    
    @ustcweizhou  That was not needed. So removed that same


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message