cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9560) Root volume of deleted VM left unremoved
Date Mon, 06 Mar 2017 09:41:32 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15896982#comment-15896982
] 

ASF GitHub Bot commented on CLOUDSTACK-9560:
--------------------------------------------

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


> Root volume of deleted VM left unremoved
> ----------------------------------------
>
>                 Key: CLOUDSTACK-9560
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9560
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Volumes
>    Affects Versions: 4.8.0
>         Environment: XenServer
>            Reporter: subhash yedugundla
>             Fix For: 4.8.1
>
>
> In the following scenario root volume gets unremoved
> Steps to reproduce the issue
> 1. Create a VM.
> 2. Stop this VM.
> 3. On the page of the volume of the VM, click 'Download Volume' icon.
> 4. Wait for the popup screen to display and cancel out with/without clicking the download
link.
> 5. Destroy the VM
> Even after the corresponding VM is deleted,expunged, the root-volume is left in 'Expunging'
state unremoved.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message