Pearl1594 commented on code in PR #13591:
URL: https://github.com/apache/cloudstack/pull/13591#discussion_r4166222847


##########
server/src/main/java/com/cloud/network/IpAddressManagerImpl.java:
##########
@@ -1425,15 +1450,19 @@ public IpAddress allocateIp(final Account ipOwner, 
final boolean isSystem, Accou
         final VlanType vlanType = VlanType.VirtualNetwork;
         final boolean assign = false;
 
-        checkPublicIpOnExternalProviderZone(zone, ipaddress);
-
         if (Grouping.AllocationState.Disabled == zone.getAllocationState() && 
!_accountMgr.isRootAdmin(caller.getId())) {
             // zone is of type DataCenter. See DataCenterVO.java.
             PermissionDeniedException ex = new 
PermissionDeniedException(generateErrorMessageForOperationOnDisabledZone("allocate
 IP addresses", zone));
             ex.addProxyObject(zone.getUuid(), "zoneId");
             throw ex;
         }
 
+        checkPublicIpOnExternalProviderZone(zone, ipaddress);
+
+        // Only steer the range when no explicit IP was requested: an explicit 
ipaddress is already
+        // validated against the provider's pool above by 
checkPublicIpOnExternalProviderZone.
+        final List<Long> vlanDbIds = ipaddress == null ? 
getNetrisVlanDbIds(zone) : null;

Review Comment:
   Netris zones can only have netris guest networks - so this is irrelevant



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to