You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by harikrishna-patnala <gi...@git.apache.org> on 2017/04/14 05:12:57 UTC

[GitHub] cloudstack pull request #2042: CLOUDSTACK-9875: Unable to re-apply Explicit ...

GitHub user harikrishna-patnala opened a pull request:

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

    CLOUDSTACK-9875: Unable to re-apply Explicit dedication to VM

    Problem:
    When a VM is deployed with in an Affinity group which has the cluster dedicated to a subdomain (zone is dedicated to parent domain) it is getting successful. We can also stop the vm and remove the affinity group, but if you want to add back the affinity it is failing.
    
    Following are the steps to reproduce
    
    1. I had created a Domain (Glass SA Parent Domain) and under it a subdomain (Glass SA Subdomain) and created an account to it.
    2. Apply dedication to the zone for primary domain (Glass SA Parent Domain)
    3. Apply dedication to the cluster for sub domain (Glass SA Subdomain)
    4. Logged in with the Account of Subdomain.
    5. Created an instance with the affinity (DedicatedGrp-domain-Glass SA Subdomain) - the dedication set with the cluster for the subdomain.
    6. Powered off the VM, removed the affinity.
    7. Tried adding back (the cluster affinity subdomain) - gives the error "Entity affinity Group () and entity Acct () belong to different accounts" 
    
    Root cause:
    During VM deployment there is clear check on affinity type (account/domain). Here since the acl_type is "domain" it does not expect to be same owner for entities.
    But during update of affinity to VM there is no specific check for acl_type "domain".
    
    Solution:
    Fix is to make the access check similar to VM deployment where it does not expect to be same owner for entities if the acl_type is "domain".

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

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

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

    https://github.com/apache/cloudstack/pull/2042.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 #2042
    
----
commit 4f6e5daa580aa5b456e946783cb08cabc4b9c6bc
Author: Harikrishna Patnala <ha...@citrix.com>
Date:   2015-11-18T12:03:49Z

    CLOUDSTACK-9875: Unable to re-apply Explicit dedication to VM
    
    Problem:
    When a VM is deployed with in an Affinity group which has the cluster dedicated to a subdomain (zone is dedicated to parent domain) it is getting successful. We can also stop the vm and remove the affinity group, but if you want to add back the affinity it is failing.
    
    Root cause:
    During VM deployment there is clear check on affinity type (account/domain). Here since the acl_type is "domain" it does not expect to be same owner for entities.
    But during update of affinity to VM there is no specific check for acl_type "domain".
    
    Solution:
    Fix is to make the access check similar to VM deployment where it does not expect to be same owner for entities if the acl_type is "domain".

----


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