You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by anshul1886 <gi...@git.apache.org> on 2015/12/23 10:47:42 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-9200: Fixed failed to delete s...

GitHub user anshul1886 opened a pull request:

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

    CLOUDSTACK-9200: Fixed failed to delete snapshot if snapshot is stuck in Allocated state without any job associated with it

    https://issues.apache.org/jira/browse/CLOUDSTACK-9200
    
    This issue is hard to reproduce but if occurs then it may lead to account resources cleanup failures.

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

    $ git pull https://github.com/anshul1886/cloudstack-1 CLOUDSTACK-9200

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

    https://github.com/apache/cloudstack/pull/1282.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 #1282
    
----
commit 1fb9b64321dbdbdd42e0cc560c65d45cd08af6c2
Author: Anshul Gangwar <an...@citrix.com>
Date:   2015-12-09T08:33:29Z

    CLOUDSTACK-9200: Fixed failed to delete snapshot if snapshot is stuck in Allocated state without any job associated with it

----


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

Posted by anshul1886 <gi...@git.apache.org>.
Github user anshul1886 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1282#issuecomment-167040721
  
    @pdube Snapshot can be in Allocated state for a split second only in normal scenarios. If it is in Allocated state for more than that time, then it simply means we are either restarting or have to restart the management server. Now if that's the case then it should have been cleaned up by storage cleanup thread during management server start if it has job associated with it. But that is not happening so it is falling in this scenario.


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snaps...

Posted by anshul1886 <gi...@git.apache.org>.
Github user anshul1886 closed the pull request at:

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


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snaps...

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

    https://github.com/apache/cloudstack/pull/1282#discussion_r110092478
  
    --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java ---
    @@ -245,6 +245,12 @@ public boolean deleteSnapshot(Long snapshotId) {
                 return true;
             }
     
    +        if(snapshotVO.getState() == Snapshot.State.Allocated) {
    --- End diff --
    
    @anshul1886 the code to check and remove snapshot when they are stuck in Allocated state is already in line 223 above, in the same method. Why this redundancy, is this a synchronization issue?


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snapshot if ...

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

    https://github.com/apache/cloudstack/pull/1282
  
    @anshul1886 I've left a comment, the code to check and remove snapshot on allocated state is already in that method?


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

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

    https://github.com/apache/cloudstack/pull/1282#issuecomment-215350146
  
    @anshul1886 The fix is only for XS snapshots. What about other HVs?


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

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

    https://github.com/apache/cloudstack/pull/1282#issuecomment-216219596
  
    @anshul1886 rebase against latest master, thanks
    
    Do you think a cleanup action of some sort be performed, as this will only delete the snapshot in database


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

Posted by Slair1 <gi...@git.apache.org>.
Github user Slair1 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1282#issuecomment-214804222
  
    Thanks!  I had the same issue, retention settings for snapshots were failing because it couldn't delete two snapshots that were stuck in "allocated' state.


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the pull request:

    https://github.com/apache/cloudstack/pull/1282#issuecomment-202495572
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 140
     Hypervisor xenserver
     NetworkType Advanced
     Passed=104
     Failed=1
     Skipped=4
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * integration.smoke.test_volumes.TestCreateVolume
    
     * test_02_attach_volume Failing since 2 runs
    
    
    **Skipped tests:**
    test_vm_nic_adapter_vmxnet3
    test_deploy_vgpu_enabled_vm
    test_06_copy_template
    test_06_copy_iso
    
    **Passed test suits:**
    integration.smoke.test_deploy_vm_with_userdata.TestDeployVmWithUserData
    integration.smoke.test_affinity_groups_projects.TestDeployVmWithAffinityGroup
    integration.smoke.test_portable_publicip.TestPortablePublicIPAcquire
    integration.smoke.test_over_provisioning.TestUpdateOverProvision
    integration.smoke.test_global_settings.TestUpdateConfigWithScope
    integration.smoke.test_scale_vm.TestScaleVm
    integration.smoke.test_service_offerings.TestCreateServiceOffering
    integration.smoke.test_loadbalance.TestLoadBalance
    integration.smoke.test_routers.TestRouterServices
    integration.smoke.test_reset_vm_on_reboot.TestResetVmOnReboot
    integration.smoke.test_snapshots.TestSnapshotRootDisk
    integration.smoke.test_deploy_vms_with_varied_deploymentplanners.TestDeployVmWithVariedPlanners
    integration.smoke.test_network.TestDeleteAccount
    integration.smoke.test_non_contigiousvlan.TestUpdatePhysicalNetwork
    integration.smoke.test_deploy_vm_iso.TestDeployVMFromISO
    integration.smoke.test_public_ip_range.TestDedicatePublicIPRange
    integration.smoke.test_multipleips_per_nic.TestDeployVM
    integration.smoke.test_regions.TestRegions
    integration.smoke.test_affinity_groups.TestDeployVmWithAffinityGroup
    integration.smoke.test_network_acl.TestNetworkACL
    integration.smoke.test_pvlan.TestPVLAN
    integration.smoke.test_ssvm.TestSSVMs
    integration.smoke.test_nic.TestNic
    integration.smoke.test_deploy_vm_root_resize.TestDeployVM
    integration.smoke.test_resource_detail.TestResourceDetail
    integration.smoke.test_secondary_storage.TestSecStorageServices
    integration.smoke.test_vm_life_cycle.TestDeployVM
    integration.smoke.test_disk_offerings.TestCreateDiskOffering


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snapshot if ...

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

    https://github.com/apache/cloudstack/pull/1282
  
    @swill @rhtyd can you 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 #1282: CLOUDSTACK-9200: Fixed failed to delete snaps...

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

    https://github.com/apache/cloudstack/pull/1282#discussion_r110092518
  
    --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java ---
    @@ -245,6 +245,12 @@ public boolean deleteSnapshot(Long snapshotId) {
                 return true;
             }
     
    +        if(snapshotVO.getState() == Snapshot.State.Allocated) {
    --- End diff --
    
    See https://github.com/apache/cloudstack/pull/1282/files#diff-2b08c10a0eea4bef15bece6ff38ed1f9R223


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the pull request:

    https://github.com/apache/cloudstack/pull/1282#issuecomment-215460320
  
    @anshul1886 I see in some other places in that file when `snapshotDao.remove(snapshotId);` is called there is a `return true` right after it.  Can you help me understand why we would or would not do that in this case?  Thanks...


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snaps...

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

    https://github.com/apache/cloudstack/pull/1282#discussion_r111500346
  
    --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java ---
    @@ -245,6 +245,12 @@ public boolean deleteSnapshot(Long snapshotId) {
                 return true;
             }
     
    +        if(snapshotVO.getState() == Snapshot.State.Allocated) {
    --- End diff --
    
    @rhtyd , you're right, this change has since already been merged by PR #977.  


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snapshot if ...

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

    https://github.com/apache/cloudstack/pull/1282
  
    @anshul1886 any idea why this hasn't been merged yet?  are there concerns/issues?


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the pull request:

    https://github.com/apache/cloudstack/pull/1282#issuecomment-222243971
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 67
     Hypervisor xenserver
     NetworkType Advanced
     Passed=68
     Failed=4
     Skipped=3
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * test_vpc_vpn.py
    
     * ContextSuite context=TestRVPCSite2SiteVpn>:setup Failed
    
     * ContextSuite context=TestVpcRemoteAccessVpn>:setup Failing since 2 runs
    
     * ContextSuite context=TestVpcSite2SiteVpn>:setup Failing since 2 runs
    
    * test_vm_life_cycle.py
    
     * test_10_attachAndDetach_iso Failed
    
    
    **Skipped tests:**
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    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_routers.py
    test_reset_vm_on_reboot.py
    test_snapshots.py
    test_deploy_vms_with_varied_deploymentplanners.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_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: CLOUDSTACK-9200: Fixed failed to delete s...

Posted by pdube <gi...@git.apache.org>.
Github user pdube commented on the pull request:

    https://github.com/apache/cloudstack/pull/1282#issuecomment-166910265
  
    How do you know if there are no jobs associated with it?


---
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: CLOUDSTACK-9200: Fixed failed to delete s...

Posted by anshul1886 <gi...@git.apache.org>.
Github user anshul1886 commented on the pull request:

    https://github.com/apache/cloudstack/pull/1282#issuecomment-215375588
  
    @koushik-das All hypervisor uses XenServerSnapshotStrategy so it should be applicable on all hypervisors.


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snapshot if ...

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

    https://github.com/apache/cloudstack/pull/1282
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 446
     Hypervisor xenserver
     NetworkType Advanced
     Passed=105
     Failed=0
     Skipped=7
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    
    **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_routers_network_ops.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 #1282: CLOUDSTACK-9200: Fixed failed to delete snaps...

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

    https://github.com/apache/cloudstack/pull/1282#discussion_r111531779
  
    --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java ---
    @@ -245,6 +245,12 @@ public boolean deleteSnapshot(Long snapshotId) {
                 return true;
             }
     
    +        if(snapshotVO.getState() == Snapshot.State.Allocated) {
    --- End diff --
    
    @rhtyd Missed that change. Closing PR 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 issue #1282: CLOUDSTACK-9200: Fixed failed to delete snapshot if ...

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

    https://github.com/apache/cloudstack/pull/1282
  
    @swill Added the return true statement. @rhtyd Snapshot in Allocated state means nothing is done for that snapshot so only deletion from DB is needed.


---
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 #1282: CLOUDSTACK-9200: Fixed failed to delete snapshot if ...

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

    https://github.com/apache/cloudstack/pull/1282
  
    @Slair1 Its missing required reviews and tests.(We have a huge backlog. any help in code review/test run is welcome). please refer to https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up


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