mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Mark all corresponding vm/lb mappings as Revoke when delete loadBalancer command is executed.
This commit is contained in:
parent
35a8318134
commit
727f56e2ac
@ -234,6 +234,15 @@ public class LoadBalancingRulesManagerImpl implements LoadBalancingRulesManager,
|
||||
lb.setState(FirewallRule.State.Revoke);
|
||||
_lbDao.persist(lb);
|
||||
|
||||
List<LoadBalancerVMMapVO> maps = _lb2VmMapDao.listByLoadBalancerId(loadBalancerId);
|
||||
if (maps != null) {
|
||||
for (LoadBalancerVMMapVO map : maps) {
|
||||
map.setRevoke(true);
|
||||
_lb2VmMapDao.persist(map);
|
||||
s_logger.debug("Set load balancer rule for revoke: rule id " + loadBalancerId + ", vmId " + map.getInstanceId());
|
||||
}
|
||||
}
|
||||
|
||||
if (apply) {
|
||||
try {
|
||||
applyLoadBalancerConfig(loadBalancerId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user