mirror of https://github.com/apache/cloudstack.git
deletGlobalLoadbalancer rule was only markign the rule as revoked, but
never removing it from the DB after applying the configuration on GSLB provider. This fix will delete the rule from the DB.
This commit is contained in:
parent
4d0a460bad
commit
73f8f46afd
|
|
@ -392,6 +392,7 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
|
|||
//mark all the GSLB-LB mapping to be in revoke state
|
||||
for (GlobalLoadBalancerLbRuleMapVO gslbLbMap : gslbLbMapVos) {
|
||||
gslbLbMap.setRevoke(true);
|
||||
_gslbLbMapDao.update(gslbLbMap.getId(), gslbLbMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -411,6 +412,16 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
|
|||
throw new CloudRuntimeException("Failed to update the gloabal load balancer");
|
||||
}
|
||||
|
||||
txn.start();
|
||||
//remove all mappings between GSLB rule and load balancer rules
|
||||
if (gslbLbMapVos != null) {
|
||||
for (GlobalLoadBalancerLbRuleMapVO gslbLbMap : gslbLbMapVos) {
|
||||
_gslbLbMapDao.remove(gslbLbMap.getId());
|
||||
}
|
||||
}
|
||||
//remove the GSLB rule itself
|
||||
_gslbRuleDao.remove(gslbRuleId);
|
||||
txn.commit();
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue