throw new InvalidParameterValueException("Load balancer ID " + loadBalancer.getUuid() + " is not assigned" + " to global load balancer rule: " +
gslbRule.getUuid());
}
}
Transaction.execute(new TransactionCallbackNoReturn() {
@Override
public void doInTransactionWithoutResult(TransactionStatus status) {
// update the mapping of gslb rule to Lb rule, to revoke state
for (Long lbRuleId : lbRuleIdsToremove) {
GlobalLoadBalancerLbRuleMapVO removeGslbLbMap = _gslbLbMapDao.findByGslbRuleIdAndLbRuleId(gslbRuleId, lbRuleId);
removeGslbLbMap.setRevoke(true);
_gslbLbMapDao.update(removeGslbLbMap.getId(), removeGslbLbMap);
}
// mark the gslb rule state as add
if (gslbRule.getState() == GlobalLoadBalancerRule.State.Staged) {
gslbRule.setState(GlobalLoadBalancerRule.State.Add);
_gslbRuleDao.update(gslbRule.getId(), gslbRule);
}
}
});
boolean success = false;
try {
s_logger.debug("Attempting to configure global load balancer rule configuration on the gslb service providers ");
// apply the gslb rule on to the back end gslb service providers
if (!applyGlobalLoadBalancerRuleConfig(gslbRuleId, false)) {
s_logger.warn("Failed to remove load balancer rules " + lbRuleIdsToremove + " from global load balancer rule id " + gslbRuleId);
CloudRuntimeException ex = new CloudRuntimeException("Failed to remove load balancer rule ids from GSLB rule ");
throw ex;
}
Transaction.execute(new TransactionCallbackNoReturn() {
@Override
public void doInTransactionWithoutResult(TransactionStatus status) {
// remove the mappings of gslb rule to Lb rule that are in revoked state
for (Long lbRuleId : lbRuleIdsToremove) {
GlobalLoadBalancerLbRuleMapVO removeGslbLbMap = _gslbLbMapDao.findByGslbRuleIdAndLbRuleId(gslbRuleId, lbRuleId);