You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by kansal <gi...@git.apache.org> on 2015/10/01 19:30:51 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-8931: Fail to deploy VM instan...

GitHub user kansal opened a pull request:

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

    CLOUDSTACK-8931: Fail to deploy VM instance when use.system.public.ip…

    …s=false - FIXED
    
    Root Cause Analysis: 
    In the present case, if the IP addresses are dedicated to the account then on deploying the VM's with shared network (SNAT enabled), it tries to give the IP addresses from the dedicated pool of account. Ideally it should give it from IP's assigned for the network. Added an additional check for this.

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

    $ git pull https://github.com/kansal/cloudstack CLOUDSTACK-8931

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

    https://github.com/apache/cloudstack/pull/907.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 #907
    
----
commit c181750e68672bc03936050c410e877f7f9521b7
Author: Kshitij Kansal <ka...@gmail.com>
Date:   2015-10-01T17:26:41Z

    CLOUDSTACK-8931: Fail to deploy VM instance when use.system.public.ips=false - FIXED

----


---
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-8931: Fail to deploy VM instan...

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

    https://github.com/apache/cloudstack/pull/907#issuecomment-147089643
  
    @kansal can you look at why travis failed, fix it; in case it was a travis issue, can you repush the change to re-trigger Travis. 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: CLOUDSTACK-8931: Fail to deploy VM instan...

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

    https://github.com/apache/cloudstack/pull/907#issuecomment-177578048
  
    @kansal It seems your PR failed because of a Travis issue. If you're still interested in working on this, I'd suggest you rebase against the current master, implement @pedro-martins's suggestions, and push again.


---
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-8931: Fail to deploy VM instan...

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

    https://github.com/apache/cloudstack/pull/907#issuecomment-216195490
  
    @kansal please rebase against latest master and push -f, update on status of your PR



---
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-8931: Fail to deploy VM instan...

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

    https://github.com/apache/cloudstack/pull/907#discussion_r51360120
  
    --- Diff: server/src/com/cloud/network/IpAddressManagerImpl.java ---
    @@ -680,10 +681,14 @@ public IPAddressVO doInTransaction(TransactionStatus status) throws Insufficient
     
             // If owner has dedicated Public IP ranges, fetch IP from the dedicated range
             // Otherwise fetch IP from the system pool
    -        List<AccountVlanMapVO> maps = _accountVlanMapDao.listAccountVlanMapsByAccount(owner.getId());
    -        for (AccountVlanMapVO map : maps) {
    -            if (vlanDbIds == null || vlanDbIds.contains(map.getVlanDbId()))
    -                dedicatedVlanDbIds.add(map.getVlanDbId());
    +        Network network = _networksDao.findById(guestNetworkId);
    +        //Checking if network is null in the case of system VM's. At the time of allocation of IP address to systemVm, no network is present.
    +        if(network == null || !(network.getGuestType() == GuestType.Shared && zone.getNetworkType() == NetworkType.Advanced)) {
    --- End diff --
    
    Hi, kansal.
    Could you extract this 'if' content to a method with a little test case and a Javadoc? 
    You had explained this 'if' pretty good in the comment above, but I think that is a little confuse to understand yet, I know that you can explain this if better and use a Javadoc to do it.
    
    Ty.


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