Github user rafaelweingartner commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1450#discussion_r57031859 --- Diff: server/src/com/cloud/network/IpAddressManagerImpl.java --- @@ -1714,8 +1714,13 @@ public boolean applyStaticNats(List<? extends StaticNat> staticNats, boolean con return true; } - // get the list of public ip's owned by the network - List<IPAddressVO> userIps = _ipAddressDao.listByAssociatedNetwork(network.getId(), null); + // get the list of public ip's that need to be applied for the static NAT. manipulating only these + // ips prevents concurrency issues when disabling static nat at the same time. + List<IPAddressVO> userIps = new ArrayList<>(); --- End diff -- Hi @ProjectMoon, what about creating a method that returns the userIps list. This new method would contain lines 1719-1722. Then, you would be able to write a unit test and add lines 1717-1718 as its java documentation.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---