weizhouapache commented on pull request #5985:
URL: https://github.com/apache/cloudstack/pull/5985#issuecomment-1039964422
@Pearl1594
in my testing, if public ips are used for port forwarding or load balancer,
everything seems ok.
If public ips are used for static nat, the interface will be removed even if
there is still public ip in use (for example, pf or lb or nat). This issue
happens with eth2 as well which is the interface for source nat.
I think we should use similar code like
```
final String lastIp =
cmd.getAccessDetail(NetworkElementCommand.NETWORK_PUB_LAST_IP);
for (final IpAddressTO ip : ips) {
if (!StringUtils.equalsIgnoreCase(lastIp, "true") ||
ip.isAdd()) {
continue;
}
```
and
```
if (publicNicInfo.first() == 2) {
s_logger.debug("Do not remove eth2 in network VR because it is
the public NIC of source NAT.");
continue;
}
```
--
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]