weizhouapache commented on a change in pull request #5902:
URL: https://github.com/apache/cloudstack/pull/5902#discussion_r824500275
##########
File path: server/src/main/java/com/cloud/server/ManagementServerImpl.java
##########
@@ -2424,7 +2425,9 @@ private void setParameters(SearchCriteria<IPAddressVO>
sc, final ListPublicIpAdd
sc.setParameters("state", state);
}
- sc.setParameters( "forsystemvms", false);
+ if (sourceNetworkId == null &&
IpAddressManagerImpl.SystemVmPublicIpReservationModeStrictness.value()) {
+ sc.setParameters("forsystemvms", false);
+ }
Review comment:
> 1 - If the configuration is 'true', the user will not be able to use
the reserved IP range. This scenario will only be true if the setting is
'false', the user creates a VM that will use one of the reserved IPs, and then
the setting is again set to 'true'. In this scenario, the reserved IPs for the
system VMs will not be listed by the API.
>
> 2 - No, you will only see the IPs from that range that are available, and
those that are used by the VMs themselves, but the IPs used by System VMs are
not listed.
@SadiJr
thanks for reply.
2 looks good to me.
however, for 1, as you said , "In this scenario, the reserved IPs for the
system VMs will not be listed by the API." so this issue is not really fixed,
right ?
would it be better to use
`IpAddressManagerImpl.SystemVmPublicIpReservationModeStrictness.value() ||
isAllocated` ?
--
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]