mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Revert "bug 14484: Apply existed firewall rules when associating IP"
This reverts commit b409615a328c059ab8daf841529fcbf8abcb8863. In order to fix CS-15503. Fix of bug 14484(CS-14253) would be applied later.
This commit is contained in:
parent
bc06fc07be
commit
4cb7a100c6
@ -262,8 +262,6 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
@Inject
|
||||
NicDao _nicDao = null;
|
||||
@Inject
|
||||
FirewallRulesDao _fwRulesDao = null;
|
||||
@Inject
|
||||
RulesManager _rulesMgr;
|
||||
@Inject
|
||||
LoadBalancingRulesManager _lbMgr;
|
||||
@ -955,27 +953,14 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
} else {
|
||||
throw new CloudRuntimeException("Fail to get ip deployer for element: " + element);
|
||||
}
|
||||
//We would apply all the existed firewall rules for this IP, since the rule maybe discard by revoke PF/LB rules
|
||||
List<FirewallRule> firewallRules = new ArrayList<FirewallRule>();
|
||||
boolean applyFirewallRules = false;
|
||||
if (element instanceof FirewallServiceProvider &&
|
||||
isProviderSupportServiceInNetwork(network.getId(), Service.Firewall, provider)) {
|
||||
applyFirewallRules = true;
|
||||
}
|
||||
Set<Service> services = new HashSet<Service>();
|
||||
for (PublicIp ip : ips) {
|
||||
if (!ipToServices.containsKey(ip)) {
|
||||
continue;
|
||||
}
|
||||
services.addAll(ipToServices.get(ip));
|
||||
if (applyFirewallRules) {
|
||||
firewallRules.addAll(_fwRulesDao.listByIpAndPurpose(ip.getId(), Purpose.Firewall));
|
||||
}
|
||||
}
|
||||
deployer.applyIps(network, ips, services);
|
||||
if (applyFirewallRules && !firewallRules.isEmpty()) {
|
||||
((FirewallServiceProvider) element).applyFWRules(network, firewallRules);
|
||||
}
|
||||
} catch (ResourceUnavailableException e) {
|
||||
success = false;
|
||||
if (!continueOnError) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user