do not release ip for advanced networking / regular LB usage

This commit is contained in:
Chiradeep Vittal 2011-08-11 17:42:50 -07:00
parent e3b35e8d95
commit e4092e8084
1 changed files with 3 additions and 0 deletions

View File

@ -772,6 +772,9 @@ public class ElasticLoadBalancerManagerImpl implements
@Override
public void handleDeleteLoadBalancerRule(LoadBalancer lb, long userId, Account caller) {
if (!_enabled) {
return;
}
List<LoadBalancerVO> remainingLbs = _loadBalancerDao.listByIpAddress(lb.getSourceIpAddressId());
if (remainingLbs.size() == 0) {
s_logger.debug("ELB mgr: releasing ip " + lb.getSourceIpAddressId() + " since no LB rules remain for this ip address");