@@ -701,7 +701,7 @@ private boolean revokePortForwardingRuleInternal(long ruleId, Account caller, lo
701701 boolean success = false ;
702702
703703 if (apply ) {
704- success = applyPortForwardingRules (rule .getSourceIpAddressId (), true , caller );
704+ success = applyPortForwardingRules (rule .getSourceIpAddressId (), _ipAddrMgr . RulesContinueOnError . value () , caller );
705705 } else {
706706 success = true ;
707707 }
@@ -736,7 +736,7 @@ private boolean revokeStaticNatRuleInternal(long ruleId, Account caller, long us
736736 boolean success = false ;
737737
738738 if (apply ) {
739- success = applyStaticNatRulesForIp (rule .getSourceIpAddressId (), true , caller , true );
739+ success = applyStaticNatRulesForIp (rule .getSourceIpAddressId (), _ipAddrMgr . RulesContinueOnError . value () , caller , true );
740740 } else {
741741 success = true ;
742742 }
@@ -769,7 +769,7 @@ public boolean revokePortForwardingRulesForVm(long vmId) {
769769 // apply rules for all ip addresses
770770 for (Long ipId : ipsToReprogram ) {
771771 s_logger .debug ("Applying port forwarding rules for ip address id=" + ipId + " as a part of vm expunge" );
772- if (!applyPortForwardingRules (ipId , true , _accountMgr .getSystemAccount ())) {
772+ if (!applyPortForwardingRules (ipId , _ipAddrMgr . RulesContinueOnError . value () , _accountMgr .getSystemAccount ())) {
773773 s_logger .warn ("Failed to apply port forwarding rules for ip id=" + ipId );
774774 success = false ;
775775 }
@@ -1098,10 +1098,10 @@ public boolean revokeAllPFAndStaticNatRulesForIp(long ipId, long userId, Account
10981098 boolean success = true ;
10991099
11001100 // revoke all port forwarding rules
1101- success = success && applyPortForwardingRules (ipId , true , caller );
1101+ success = success && applyPortForwardingRules (ipId , _ipAddrMgr . RulesContinueOnError . value () , caller );
11021102
11031103 // revoke all all static nat rules
1104- success = success && applyStaticNatRulesForIp (ipId , true , caller , true );
1104+ success = success && applyStaticNatRulesForIp (ipId , _ipAddrMgr . RulesContinueOnError . value () , caller , true );
11051105
11061106 // revoke static nat for the ip address
11071107 success = success && applyStaticNatForIp (ipId , false , caller , true );
@@ -1144,9 +1144,11 @@ public boolean revokeAllPFStaticNatRulesForNetwork(long networkId, long userId,
11441144 boolean success = true ;
11451145 // revoke all PF rules for the network
11461146 success = success && applyPortForwardingRulesForNetwork (networkId , true , caller );
1147+ success = success && applyPortForwardingRulesForNetwork (networkId , _ipAddrMgr .RulesContinueOnError .value (), caller );
11471148
11481149 // revoke all all static nat rules for the network
11491150 success = success && applyStaticNatRulesForNetwork (networkId , true , caller );
1151+ success = success && applyStaticNatRulesForNetwork (networkId , _ipAddrMgr .RulesContinueOnError .value (), caller );
11501152
11511153 // Now we check again in case more rules have been inserted.
11521154 rules .addAll (_portForwardingDao .listByNetworkAndNotRevoked (networkId ));
0 commit comments