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

[GitHub] cloudstack pull request #1857: BUG-ID: CLOUDSTACK-8284

GitHub user adwaitpatankar opened a pull request:

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

    BUG-ID: CLOUDSTACK-8284

    On expunge VM, initiate resource count update at domain
    level. Setting accountId as null ensures resource count is done at domain level and any hierarchies below.

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

    $ git pull https://github.com/Accelerite/cloudstack CLOUDSTACK-8284

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

    https://github.com/apache/cloudstack/pull/1857.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 #1857
    
----
commit 468ec40963189f1e68be46c4c0f2955eb3a520ab
Author: Adwait Patankar <ad...@accelerite.com>
Date:   2016-07-27T20:41:11Z

    BUG-ID: CLOUDSTACK-8284
    On expunge VM, initiate resource count update at domain
    level. Setting accountId as null ensures resource count is done
     at domain level and any hierarchies below.

----


---
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 #1857: CLOUDSTACK-8284: On expunge VM, initiate resource co...

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

    https://github.com/apache/cloudstack/pull/1857
  
     ### ACS CI BVT Run
     **Sumarry:**
     Build Number 348
     Hypervisor xenserver
     NetworkType Advanced
     Passed=103
     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 Failed
    
    
    **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 issue #1857: CLOUDSTACK-8284: On expunge VM, initiate resource co...

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

    https://github.com/apache/cloudstack/pull/1857
  
    @adwaitpatankar oh, I totally understand the issue and the change you made. You are right as I remember. However, I think the recalculation on other accounts in the domain is not necessary ( we also thought about this change before), so please test my suggestion in previous comment if possible.
    
    by the way, the issue also exists in engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java.


---
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 #1857: CLOUDSTACK-8284: On expunge VM, initiate resource co...

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

    https://github.com/apache/cloudstack/pull/1857
  
    @adwaitpatankar this is because _resourceLimitMgr.recalculateResourceCount only recalculate the resource count on account(if accountid is set), or domain (if accountid is not set), not both account/domain.
    
    We have this issue before, it is fixed by replacing _resourceLimitMgr.recalculateResourceCount with
    {code}
                    _resourceLimitMgr.decrementResourceCount(vm.getAccountId(), ResourceType.primary_storage, rootVol.get(0).isDisplay(), new Long(rootVol.get(0).getSize()));
    {code}


---
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 #1857: CLOUDSTACK-8284: On expunge VM, initiate resource co...

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

    https://github.com/apache/cloudstack/pull/1857
  
    @ustcweizhou, the issue is that the resource count at domain level are not getting updated implicitly after expunge VM call. If the user tries to add a new instance, and if the primary storage resource count is not up to date, then it results in a false alarm (exception) and not allowing the user to create a guest instance even though the requested storage space is withing the limits of the domain quota.
    When we do not pass accountID (as per the fix), the resource counts would be getting calculated on expungeVM event at Domain level which is the expectation as per the ticket. Also when the resource calculation is done at Domain level, all resource counts for all accounts within that domain are recalculated as well.


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