GitHub user harikrishna-patnala opened a pull request:

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

    Deploy VM failing frequently due to capacity calculation not synchron…

    
    
    There are some VM deployment failures happening when multiple VMs are 
deployed at a time, failures mainly due to NetworkModel code that iterates over 
all the vlans in the pod. This causes each deployVM thread to hold the global 
lock on Network longer and cause delays. This delay in turn causes more threads 
to choose same host and fail since capacity is not available on that host.
    
    Following are some changes required to be done to reduce delays during VM 
deployments which in turn causes some vm deployment failures when multiple VMs 
are launched at a time.
    
      -  In Planner, remove the clusters that do not contain a host with 
matching service offering tag. This will save some iterations over clusters 
that dont have matching tagged host
      -  In NetworkModel, do not query the vlans for the pod within the loop. 
Also optimized the logic to query the ip/ipv6
      -  In DeploymentPlanningManagerImpl, do not process the affinity group if 
the plan has hostId provided.
    


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

    $ git pull https://github.com/harikrishna-patnala/cloudstack CLOUDSTACK-9112

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

    https://github.com/apache/cloudstack/pull/1180.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 #1180
    
----
commit 8394e1940535b05525bebebdb8fcc73fcaefc709
Author: Harikrishna Patnala <harikrishna.patn...@citrix.com>
Date:   2015-12-04T09:57:53Z

    Deploy VM failing frequently due to capacity calculation not synchronized
    
    Changes:
    - In Planner, remove the clusters that do not contain a host with matching 
service offering tag. This will save some iterations over clusters that dont 
have matching tagged host
    - In NetworkModel, do not query the vlans for the pod within the loop. Also 
optimized the logic to query the ip/ipv6
    - In DeploymentPlanningManagerImpl, do not process the affinity group if 
the plan has hostId provided.

----


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