cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject git commit: updated refs/heads/master to 56d7cce
Date Tue, 06 Aug 2013 00:26:38 GMT
Updated Branches:
  refs/heads/master 12d624950 -> 56d7ccef9


CLOUDSTACK-4037: [GSLB] removeFromGSLBRule is not cleaning the
cloudsite1 infro from the second site NetScaler device

ensuring when a site no longer participates in GSLB, complete GSLB
config for that rule is wiped out on the GSLB provider for that site


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/56d7ccef
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/56d7ccef
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/56d7ccef

Branch: refs/heads/master
Commit: 56d7ccef97b365f3cf28c64188af8eeb99baa7d0
Parents: 12d6249
Author: Murali Reddy <muralimmreddy@gmail.com>
Authored: Tue Aug 6 05:53:48 2013 +0530
Committer: Murali Reddy <muralimmreddy@gmail.com>
Committed: Tue Aug 6 05:56:26 2013 +0530

----------------------------------------------------------------------
 .../agent/api/routing/GlobalLoadBalancerConfigCommand.java  | 4 ++++
 .../region/gslb/GlobalLoadBalancingRulesServiceImpl.java    | 9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/56d7ccef/core/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java b/core/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java
index b3603c8..c518232 100644
--- a/core/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java
+++ b/core/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java
@@ -93,6 +93,10 @@ public class GlobalLoadBalancerConfigCommand extends Command {
         return revoked;
     }
 
+    public void setForRevoke(boolean revoke) {
+        this.revoked = revoke;
+    }
+
     @Override
     public boolean executeInSequence() {
         return false;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/56d7ccef/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
index 0ba09c1..a16814c 100644
--- a/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
+++ b/server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java
@@ -664,7 +664,6 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
         for (Pair<Long,Long> zoneId: gslbSiteIds) {
 
             List<SiteLoadBalancerConfig> slbs = new ArrayList<SiteLoadBalancerConfig>();
-
             // set site as 'local' for the site in that zone
             for (Pair<Long,Long> innerLoopZoneId: gslbSiteIds) {
                 SiteLoadBalancerConfig siteLb = zoneSiteLoadbalancerMap.get(innerLoopZoneId.first());
@@ -673,6 +672,14 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
             }
 
             gslbConfigCmd.setSiteLoadBalancers(slbs);
+            gslbConfigCmd.setForRevoke(revoke);
+
+            // revoke GSLB configuration completely on the site GSLB provider for the sites
that no longer
+            // are participants of a GSLB rule
+            SiteLoadBalancerConfig siteLb = zoneSiteLoadbalancerMap.get(zoneId.first());
+            if (siteLb.forRevoke()) {
+                gslbConfigCmd.setForRevoke(true);
+            }
 
             try {
                 _gslbProvider.applyGlobalLoadBalancerRule(zoneId.first(), zoneId.second(),
gslbConfigCmd);


Mime
View raw message