[
https://issues.apache.org/jira/browse/CLOUDSTACK-9639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15712335#comment-15712335
]
ASF GitHub Bot commented on CLOUDSTACK-9639:
--------------------------------------------
Github user jburwell commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1804#discussion_r90476049
--- Diff: server/src/com/cloud/configuration/ConfigurationManagerImpl.java
---
@@ -3092,8 +3092,12 @@ public Vlan createVlanAndPublicIpRange(final long
zoneId, final long networkId,
final String guestNetworkCidr = zone.getGuestNetworkCidr();
if (guestNetworkCidr != null) {
if (NetUtils.isNetworksOverlap(newCidr, guestNetworkCidr))
{
- throw new InvalidParameterValueException("The new IP
range you have specified has overlapped with the guest network in zone: " +
zone.getName()
- + ". Please specify a different
gateway/netmask.");
+ // when adding shared network with same cidr of zone
guest cidr,
+ // if the specified vlan is not present in zone,
physical network, allow to create the network as the isolation is based on VLAN.
+ if (_zoneDao.findVnet(zoneId, physicalNetworkId,
vlanId).size() > 0) {
--- End diff --
Please consider using `isEmpty` rather than a size check to determine
whether or not a list contains elements. It is more idiomatic/clear, but less
error prone. Also, why isn't this `if` condition combined with the previous
`if` block and an `&&` operator.
> Unable to create shared network with vLan isolation
> ---------------------------------------------------
>
> Key: CLOUDSTACK-9639
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9639
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Nitin Kumar Maharana
>
> Create shared network fails with error While creating a shared network it
> fails to create with Error "The new IP range you have specified has
> overlapped with the guest network in the zone: XYZ. Please specify a
> different gateway/netmask"
> Steps to Reproduce:
> ===============
> Create an isolated network with a subnet eg: 10.1.1.0.24
> Create a shared network with the same subnet but different VLAN, we should
> observe this issue.
> EXPECTED BEHAVIOR
> ===================
> It shouldn't restrict the creation of guest network's with same subnet as
> long as they are segmented by VLAN.
> ACTUAL BEHAVIOR
> ================
> It doesn't allow the creation of shared guest networks if there is any
> isolated guest network using the same subnet although it allows using the
> same subnet in multiple shared networks.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)