[
https://issues.apache.org/jira/browse/CLOUDSTACK-8931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125319#comment-15125319
]
ASF GitHub Bot commented on CLOUDSTACK-8931:
--------------------------------------------
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.
> Fail to deploy VM instance when use.system.public.ips=false
> -----------------------------------------------------------
>
> Key: CLOUDSTACK-8931
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8931
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Kshitij Kansal
>
> REPRO STEPS
> 1. Create a Shared network with SNAT service offering.
> 2. Assigned a public IP range to a user.
> 3. Created a domain scoped Shared network with the new service offering.
> The user should be under the domain above.
> 4. As a user Acquired Public IP addresses from new shared network.
> 5. Logon as user and deploy a VM instance encounter below error:
> Status: Insufficient address capacity
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)