You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by yvsubhash <gi...@git.apache.org> on 2016/10/24 12:33:56 UTC

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

GitHub user yvsubhash opened a pull request:

    https://github.com/apache/cloudstack/pull/1726

    CLOUDSTACK-9560 Root volume of deleted VM left unremoved

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yvsubhash/cloudstack CLOUDSTACK-9560

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1726.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1726
    
----
commit a4e8cc20db18e04ec8cce4a90676b5ef632debe9
Author: subhash yedugundla <ve...@citrix.com>
Date:   2016-05-31T11:45:04Z

    CLOUDSTACK-9560 Root volume of deleted VM left unremoved

----


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @blueorangutan package


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r87917132
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume != null && volume.getState() == Volume.State.Expunged)
    +                {
    +                    _volumeDao.remove(volumeId);
    +                }
    --- End diff --
    
    @yvsubhash have you had a chance to review @ustcweizhou's feedback?


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by yvsubhash <gi...@git.apache.org>.
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @ustcweizhou  Volume snapshots would be left over even in case of normal vm destroy and that is expected. They can be used if there is a need to restore the volume at a later point in time.  The snapshots are visible under storage->snapshots. So i dont see a need to clean up those snapshots


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @yvsubhash can you reply to raised review comments?


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @ustcweizhou  Please review


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r90594621
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume != null && volume.getState() == Volume.State.Expunged)
    +                {
    +                    _volumeDao.remove(volumeId);
    +                }
    --- End diff --
    
    @yvsubhash ping


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @yvsubhash so, the question is , in what condition the volume is Expunged but not removed ? if it does not happen, then the change from line 2211 to 2215 is not needed.
    however, to be honest, I often see a volume is Expunged but not Removed.


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @yvsubhash yes, you are right, it is 'download links', not 'volume snapshots'. I made changes on this long time ago and almost forgot how it works.
    
    so, my question is, should we 'Remove' the volume after a download link is expired, or all download links are expired ?



---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @ustcweizhou does it look good to you now?


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r92754533
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume != null && volume.getState() == Volume.State.Expunged)
    +                {
    +                    _volumeDao.remove(volumeId);
    +                }
    --- End diff --
    
    @yvsubhash can you have a look at @ustcweizhou 's comment.


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @ustcweizhou  In case of volume snapsnots, volume gets set to removed irrespective of the presence of snapshots. I have verified the same  just now and I am only removing volume not any of the snapshots


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    LGTM now


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r85108024
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume != null && volume.getState() == Volume.State.Expunged)
    +                {
    +                    _volumeDao.remove(volumeId);
    +                }
    --- End diff --
    
    There might be multiple volume snapshot on image store.
    We need to make sure that all volume snapshot have been removed from image store.
    
    ```
    +                VolumeDataStoreVO volumesOnImageStore = _volumeStoreDao.findByVolume(volumeId);
    +                if (volumesOnImageStore == null) { // volume is expunged from primary, as well as on secondary
    +                    VolumeVO vol = _volumeDao.findById(volumeId);
    +                    if (vol != null && (vol.getState() == Volume.State.Expunged)) {
    +                        _volumeDao.remove(volumeId);
    +                    }
    +                }
    ```


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @blueorangutan package


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by syed <gi...@git.apache.org>.
Github user syed commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    LGTM :+1: 


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @ustcweizhou  As I understand, Volume goes to Expunged state when it is removed from primary and gets removed when it is removed from secondary storage. line 2211 to 2215 is to handle specific case where volume getting removed from primary But not getting removed from secondary because of the download link. So cleaning up the same after the downlink is expired


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by cloudmonger <gi...@git.apache.org>.
Github user cloudmonger commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 456
     Hypervisor xenserver
     NetworkType Advanced
     Passed=104
     Failed=1
     Skipped=7
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * test_routers_network_ops.py
    
     * test_03_RVR_Network_check_router_state Failing since 2 runs
    
    
    **Skipped tests:**
    test_01_test_vm_volume_snapshot
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    test_11_ss_nfs_version_on_ssvm
    test_nested_virtualization_vmware
    test_3d_gpu_support
    test_deploy_vgpu_enabled_vm
    
    **Passed test suits:**
    test_deploy_vm_with_userdata.py
    test_affinity_groups_projects.py
    test_portable_publicip.py
    test_over_provisioning.py
    test_global_settings.py
    test_scale_vm.py
    test_service_offerings.py
    test_routers_iptables_default_policy.py
    test_loadbalance.py
    test_routers.py
    test_reset_vm_on_reboot.py
    test_deploy_vms_with_varied_deploymentplanners.py
    test_network.py
    test_router_dns.py
    test_non_contigiousvlan.py
    test_login.py
    test_deploy_vm_iso.py
    test_list_ids_parameter.py
    test_public_ip_range.py
    test_multipleips_per_nic.py
    test_regions.py
    test_affinity_groups.py
    test_network_acl.py
    test_pvlan.py
    test_volumes.py
    test_nic.py
    test_deploy_vm_root_resize.py
    test_resource_detail.py
    test_secondary_storage.py
    test_vm_life_cycle.py
    test_disk_offerings.py


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r104370668
  
    --- 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 --
    
    what's the proposal of line 2285 to line 2287 ?


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r86956330
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume != null && volume.getState() == Volume.State.Expunged)
    +                {
    +                    _volumeDao.remove(volumeId);
    +                }
    --- End diff --
    
    @yvsubhash can you reply to @ustcweizhou 's comment above ^^ ?


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by koushik-das <gi...@git.apache.org>.
Github user koushik-das commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r84837338
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume.getState() == Volume.State.Expunged)
    --- End diff --
    
    Null check on volume?


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian. JID-91


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    <b>Trillian test result (tid-179)</b>
    Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
    Total time taken: 24929 seconds
    Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr1726-t179-kvm-centos7.zip
    Test completed. 43 look ok, 0 have error(s)
    
    
    Test | Result | Time (s) | Test File
    --- | --- | --- | ---
    test_01_vpc_site2site_vpn | Success | 160.69 | test_vpc_vpn.py
    test_01_vpc_remote_access_vpn | Success | 66.88 | test_vpc_vpn.py
    test_01_redundant_vpc_site2site_vpn | Success | 251.75 | test_vpc_vpn.py
    test_02_VPC_default_routes | Success | 284.86 | test_vpc_router_nics.py
    test_01_VPC_nics_after_destroy | Success | 557.95 | test_vpc_router_nics.py
    test_05_rvpc_multi_tiers | Success | 515.21 | test_vpc_redundant.py
    test_04_rvpc_network_garbage_collector_nics | Success | 1310.57 | test_vpc_redundant.py
    test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | Success | 556.64 | test_vpc_redundant.py
    test_02_redundant_VPC_default_routes | Success | 763.30 | test_vpc_redundant.py
    test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Success | 1301.57 | test_vpc_redundant.py
    test_09_delete_detached_volume | Success | 15.53 | test_volumes.py
    test_08_resize_volume | Success | 15.48 | test_volumes.py
    test_07_resize_fail | Success | 20.45 | test_volumes.py
    test_06_download_detached_volume | Success | 15.55 | test_volumes.py
    test_05_detach_volume | Success | 100.34 | test_volumes.py
    test_04_delete_attached_volume | Success | 10.20 | test_volumes.py
    test_03_download_attached_volume | Success | 15.44 | test_volumes.py
    test_02_attach_volume | Success | 45.26 | test_volumes.py
    test_01_create_volume | Success | 714.64 | test_volumes.py
    test_deploy_vm_multiple | Success | 274.23 | test_vm_life_cycle.py
    test_deploy_vm | Success | 0.03 | test_vm_life_cycle.py
    test_advZoneVirtualRouter | Success | 0.02 | test_vm_life_cycle.py
    test_10_attachAndDetach_iso | Success | 26.97 | test_vm_life_cycle.py
    test_09_expunge_vm | Success | 125.19 | test_vm_life_cycle.py
    test_08_migrate_vm | Success | 41.34 | test_vm_life_cycle.py
    test_07_restore_vm | Success | 0.29 | test_vm_life_cycle.py
    test_06_destroy_vm | Success | 126.03 | test_vm_life_cycle.py
    test_03_reboot_vm | Success | 126.33 | test_vm_life_cycle.py
    test_02_start_vm | Success | 10.21 | test_vm_life_cycle.py
    test_01_stop_vm | Success | 35.40 | test_vm_life_cycle.py
    test_CreateTemplateWithDuplicateName | Success | 81.08 | test_templates.py
    test_08_list_system_templates | Success | 0.05 | test_templates.py
    test_07_list_public_templates | Success | 0.04 | test_templates.py
    test_05_template_permissions | Success | 0.06 | test_templates.py
    test_04_extract_template | Success | 5.16 | test_templates.py
    test_03_delete_template | Success | 5.21 | test_templates.py
    test_02_edit_template | Success | 90.27 | test_templates.py
    test_01_create_template | Success | 40.54 | test_templates.py
    test_10_destroy_cpvm | Success | 161.68 | test_ssvm.py
    test_09_destroy_ssvm | Success | 164.54 | test_ssvm.py
    test_08_reboot_cpvm | Success | 101.60 | test_ssvm.py
    test_07_reboot_ssvm | Success | 163.81 | test_ssvm.py
    test_06_stop_cpvm | Success | 132.02 | test_ssvm.py
    test_05_stop_ssvm | Success | 164.12 | test_ssvm.py
    test_04_cpvm_internals | Success | 1.32 | test_ssvm.py
    test_03_ssvm_internals | Success | 3.27 | test_ssvm.py
    test_02_list_cpvm_vm | Success | 0.12 | test_ssvm.py
    test_01_list_sec_storage_vm | Success | 0.13 | test_ssvm.py
    test_01_snapshot_root_disk | Success | 11.99 | test_snapshots.py
    test_04_change_offering_small | Success | 209.95 | test_service_offerings.py
    test_03_delete_service_offering | Success | 0.04 | test_service_offerings.py
    test_02_edit_service_offering | Success | 0.09 | test_service_offerings.py
    test_01_create_service_offering | Success | 0.10 | test_service_offerings.py
    test_02_sys_template_ready | Success | 0.12 | test_secondary_storage.py
    test_01_sys_vm_start | Success | 0.20 | test_secondary_storage.py
    test_09_reboot_router | Success | 40.45 | test_routers.py
    test_08_start_router | Success | 30.30 | test_routers.py
    test_07_stop_router | Success | 10.17 | test_routers.py
    test_06_router_advanced | Success | 0.05 | test_routers.py
    test_05_router_basic | Success | 0.04 | test_routers.py
    test_04_restart_network_wo_cleanup | Success | 5.68 | test_routers.py
    test_03_restart_network_cleanup | Success | 60.53 | test_routers.py
    test_02_router_internal_adv | Success | 1.16 | test_routers.py
    test_01_router_internal_basic | Success | 0.63 | test_routers.py
    test_router_dhcphosts | Success | 277.91 | test_router_dhcphosts.py
    test_01_updatevolumedetail | Success | 5.16 | test_resource_detail.py
    test_01_reset_vm_on_reboot | Success | 156.45 | test_reset_vm_on_reboot.py
    test_createRegion | Success | 0.04 | test_regions.py
    test_create_pvlan_network | Success | 5.20 | test_pvlan.py
    test_dedicatePublicIpRange | Success | 0.40 | test_public_ip_range.py
    test_04_rvpc_privategw_static_routes | Success | 452.94 | test_privategw_acl.py
    test_03_vpc_privategw_restart_vpc_cleanup | Success | 533.60 | test_privategw_acl.py
    test_02_vpc_privategw_static_routes | Success | 379.57 | test_privategw_acl.py
    test_01_vpc_privategw_acl | Success | 93.52 | test_privategw_acl.py
    test_01_primary_storage_nfs | Success | 35.84 | test_primary_storage.py
    test_createPortablePublicIPRange | Success | 15.21 | test_portable_publicip.py
    test_createPortablePublicIPAcquire | Success | 15.65 | test_portable_publicip.py
    test_isolate_network_password_server | Success | 86.53 | test_password_server.py
    test_UpdateStorageOverProvisioningFactor | Success | 0.14 | test_over_provisioning.py
    test_extendPhysicalNetworkVlan | Success | 15.54 | test_non_contigiousvlan.py
    test_01_nic | Success | 784.89 | test_nic.py
    test_releaseIP | Success | 270.24 | test_network.py
    test_reboot_router | Success | 411.12 | test_network.py
    test_public_ip_user_account | Success | 10.38 | test_network.py
    test_public_ip_admin_account | Success | 40.31 | test_network.py
    test_network_rules_acquired_public_ip_3_Load_Balancer_Rule | Success | 67.33 | test_network.py
    test_network_rules_acquired_public_ip_2_nat_rule | Success | 62.00 | test_network.py
    test_network_rules_acquired_public_ip_1_static_nat_rule | Success | 124.51 | test_network.py
    test_delete_account | Success | 305.55 | test_network.py
    test_02_port_fwd_on_non_src_nat | Success | 56.02 | test_network.py
    test_01_port_fwd_on_src_nat | Success | 111.91 | test_network.py
    test_nic_secondaryip_add_remove | Success | 214.19 | test_multipleips_per_nic.py
    login_test_saml_user | Success | 24.90 | test_login.py
    test_assign_and_removal_lb | Success | 133.28 | test_loadbalance.py
    test_02_create_lb_rule_non_nat | Success | 187.70 | test_loadbalance.py
    test_01_create_lb_rule_src_nat | Success | 187.95 | test_loadbalance.py
    test_07_list_default_iso | Success | 0.08 | test_iso.py
    test_05_iso_permissions | Success | 0.09 | test_iso.py
    test_04_extract_Iso | Success | 5.17 | test_iso.py
    test_03_delete_iso | Success | 95.23 | test_iso.py
    test_02_edit_iso | Success | 0.12 | test_iso.py
    test_01_create_iso | Success | 22.01 | test_iso.py
    test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | Success | 238.85 | test_internal_lb.py
    test_03_vpc_internallb_haproxy_stats_on_all_interfaces | Success | 189.12 | test_internal_lb.py
    test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | Success | 557.17 | test_internal_lb.py
    test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | Success | 493.78 | test_internal_lb.py
    test_dedicateGuestVlanRange | Success | 10.37 | test_guest_vlan_range.py
    test_UpdateConfigParamWithScope | Success | 0.14 | test_global_settings.py
    test_04_create_fat_type_disk_offering | Success | 0.06 | test_disk_offerings.py
    test_03_delete_disk_offering | Success | 0.04 | test_disk_offerings.py
    test_02_edit_disk_offering | Success | 0.20 | test_disk_offerings.py
    test_02_create_sparse_type_disk_offering | Success | 0.06 | test_disk_offerings.py
    test_01_create_disk_offering | Success | 0.10 | test_disk_offerings.py
    test_deployvm_userdispersing | Success | 20.99 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userconcentrated | Success | 20.72 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_firstfit | Success | 101.49 | test_deploy_vms_with_varied_deploymentplanners.py
    test_deployvm_userdata_post | Success | 35.59 | test_deploy_vm_with_userdata.py
    test_deployvm_userdata | Success | 55.72 | test_deploy_vm_with_userdata.py
    test_02_deploy_vm_root_resize | Success | 7.51 | test_deploy_vm_root_resize.py
    test_01_deploy_vm_root_resize | Success | 6.83 | test_deploy_vm_root_resize.py
    test_00_deploy_vm_root_resize | Success | 239.08 | test_deploy_vm_root_resize.py
    test_deploy_vm_from_iso | Success | 213.56 | test_deploy_vm_iso.py
    test_DeployVmAntiAffinityGroup | Success | 101.24 | test_affinity_groups.py
    test_03_delete_vm_snapshots | Skipped | 0.00 | test_vm_snapshots.py
    test_02_revert_vm_snapshots | Skipped | 0.00 | test_vm_snapshots.py
    test_01_test_vm_volume_snapshot | Skipped | 0.00 | test_vm_snapshots.py
    test_01_create_vm_snapshots | Skipped | 0.00 | test_vm_snapshots.py
    test_06_copy_template | Skipped | 0.00 | test_templates.py
    test_01_scale_vm | Skipped | 0.00 | test_scale_vm.py
    test_01_primary_storage_iscsi | Skipped | 0.04 | test_primary_storage.py
    test_06_copy_iso | Skipped | 0.00 | test_iso.py
    test_deploy_vgpu_enabled_vm | Skipped | 0.01 | test_deploy_vgpu_enabled_vm.py



---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @yvsubhash I did not mean we need clean up the snapshots. 
    in my understanding, if the volume has snapshots left, it is Expunged, but not marked as Removed
    your change just delete one snapshot and then mark the volume as Removed, however, there might be other snapshots left (in this case, we should not mark the volume as Removed)


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by koushik-das <gi...@git.apache.org>.
Github user koushik-das commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    Code LGTM


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    code LGTM
     @yvsubhash it would be nice if you can reformat part of the code with java code conventions.



---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    tag:mergeready


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by niteshsarda <gi...@git.apache.org>.
Github user niteshsarda commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    I have tested this and **LGTM** for test


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @ustcweizhou  coding convention issue is taken care


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @koushik-das Added the null check


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r84859378
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume.getState() == Volume.State.Expunged)
    --- End diff --
    
    @koushik-das Having a null for volume is not a possible scenario as there is db level relation ship between volume and volume_store_ref and the id is picked up from volume_store_ref. Would you still recommend having a null check here?


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @rhtyd  Can you please merge this 


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by yvsubhash <gi...@git.apache.org>.
Github user yvsubhash commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @ustcweizhou  thats good point. It should be removed after all download links expire. I will address this case


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian. JID-190


---
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.
---

[GitHub] cloudstack pull request #1726: CLOUDSTACK-9560 Root volume of deleted VM lef...

Posted by koushik-das <gi...@git.apache.org>.
Github user koushik-das commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1726#discussion_r84862649
  
    --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java ---
    @@ -2199,15 +2199,20 @@ public void cleanupDownloadUrls(){
                     if(downloadUrlCurrentAgeInSecs < _downloadUrlExpirationInterval){  // URL hasnt expired yet
                         continue;
                     }
    -
    -                s_logger.debug("Removing download url " + volumeOnImageStore.getExtractUrl() + " for volume id " + volumeOnImageStore.getVolumeId());
    +                long volumeId = volumeOnImageStore.getVolumeId();
    +                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);
     
                     // Now expunge it from DB since this entry was created only for download purpose
                     _volumeStoreDao.expunge(volumeOnImageStore.getId());
    +                Volume volume = _volumeDao.findById(volumeId);
    +                if (volume.getState() == Volume.State.Expunged)
    --- End diff --
    
    @yvsubhash It is not about the DB relationship, is it possible that some other thread went ahead and deleted the volume entry after the store_ref entries are queried?


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


---
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.
---

[GitHub] cloudstack issue #1726: CLOUDSTACK-9560 Root volume of deleted VM left unrem...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1726
  
    @blueorangutan test


---
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.
---