GitHub user SudharmaJain opened a pull request:

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

    CLOUDSTACK-8910: The reserved_capacity field increases suddenly after…

    … a vmware host failure
    
    In case of vmware host failure, all the VMs including stopped VMs migrate 
to the new host. For the Stopped Vms powerhost gets updated. This was 
triggering HandlePowerStateReport which finally calls updatePowerState updating 
update_time for the VM. This cause the capacity being reserved for stopped VMs 
capacity skip counting hours. 
    
    Added the change to avoid update if the VM is in stopped state and host Id 
is null. 
    
    Verified the fix manually. 
    
    Here are the repro steps:
    1. take a HA enabled cluster with two hosts.
    2. should have few started and stopped VMs to each of the host.
    3. Now shutdown one host.
    4. All VMs(including stopped) on the host will migrate to another host.
    5. Now update time of even stopped VMs get updated and will reserve the 
capacity for skip counting hours on the host identified by last_host_id.

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

    $ git pull https://github.com/SudharmaJain/cloudstack cs-8910

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

    https://github.com/apache/cloudstack/pull/892.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 #892
    
----
commit 3feda2024c8f7a8d9965dddb16bfbf452b3dd84b
Author: SudharmaJain <sudharma.j...@citrix.com>
Date:   2015-09-25T19:20:11Z

    CLOUDSTACK-8910: The reserved_capacity field increases suddenly after a 
vmware host failure
    
    In case of vmware host failure, all the VMs including stopped VMs migrate
    to the new host. For the Stopped Vms powerhost gets updated. This was
    triggering HandlePowerStateReport which finally calls updatePowerState
    updating update_time for the VM. This cause the capacity being reserved
    for stopped VMs.

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to