cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: updated refs/heads/4.4 to dcb0db6
Date Thu, 17 Apr 2014 03:16:33 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 94a146a43 -> dcb0db608


CLOUDSTACK-6434: Make RvR advert_int configurable

In some network environment, 1*3 seconds by default make RvR setup too
sensitive. A configurable parameter would be better for fitting different
network environments.


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

Branch: refs/heads/4.4
Commit: dcb0db6084532f05934f9840e1bbfbcd2f2afc62
Parents: 94a146a
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Wed Apr 16 20:13:16 2014 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Wed Apr 16 20:15:56 2014 -0700

----------------------------------------------------------------------
 server/src/com/cloud/configuration/Config.java              | 9 +++++++++
 .../network/router/VirtualNetworkApplianceManagerImpl.java  | 3 +++
 setup/db/db/schema-430to440.sql                             | 2 ++
 .../patches/debian/config/etc/init.d/cloud-early-config     | 9 +++++++++
 4 files changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dcb0db60/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index 1e42ca5..a02050f 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -1915,6 +1915,15 @@ public enum Config {
             "the interval cloudstack sync with UCS manager for available blades in case user
remove blades from chassis without notifying CloudStack",
             null),
 
+    RedundantRouterVrrpInterval(
+            "Advanced",
+            NetworkOrchestrationService.class,
+            Integer.class,
+            "router.redundant.vrrp.interval",
+            "1",
+            "seconds between VRRP broadcast. It would 3 times broadcast fail to trigger fail-over
mechanism of redundant router",
+            null),
+
     ManagementServerVendor("Advanced", ManagementServer.class, String.class, "mgt.server.vendor",
"ACS", "the vendor of management server", null);
 
     private final String _category;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dcb0db60/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 8e97793..80ca1cf 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -2339,6 +2339,9 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
             buf.append(" guestbrd=").append(brd);
             buf.append(" guestcidrsize=").append(NetUtils.getCidrSize(guestNic.getNetmask()));
             buf.append(" router_pr=").append(router.getPriority());
+
+            int advertInt = NumbersUtil.parseInt(_configDao.getValue(Config.RedundantRouterVrrpInterval.key()),
1);
+            buf.append(" advert_int=").append(advertInt);
         }
 
         //setup network domain

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dcb0db60/setup/db/db/schema-430to440.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-430to440.sql b/setup/db/db/schema-430to440.sql
index 055b09d..fff0ea3 100644
--- a/setup/db/db/schema-430to440.sql
+++ b/setup/db/db/schema-430to440.sql
@@ -770,3 +770,5 @@ ALTER TABLE `cloud`.`networks` ADD COLUMN streched_l2 boolean default
false;
 ALTER TABLE `cloud`.`vpc` ADD COLUMN region_level_vpc boolean default false;
 ALTER TABLE `cloud`.`load_balancer_vm_map` ADD COLUMN instance_ip VARCHAR(40);
 ALTER TABLE `cloud`.`load_balancer_vm_map` DROP KEY `load_balancer_id`, ADD UNIQUE KEY load_balancer_id
(`load_balancer_id`, `instance_id`, `instance_ip`);
+
+INSERT INTO `cloud`.`configuration`(category, instance, component, name, value, description,
default_value) VALUES ('Advanced', 'DEFAULT', 'NetworkOrchestrationService', 'router.redundant.vrrp.interval',
'1', 'seconds between VRRP broadcast. It would 3 times broadcast fail to trigger fail-over
mechanism of redundant router', '1') ON DUPLICATE KEY UPDATE category='Advanced';

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dcb0db60/systemvm/patches/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index f8ba8a1..ffb23ec 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -865,6 +865,12 @@ setup_redundant_router() {
     sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/check_heartbeat.sh
     sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/arping_gateways.sh
     sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" /opt/cloud/bin/checkrouter.sh
+
+    if [ $ADVERT_INT ]
+    then
+        sed -i "s/advert_int 1/advert_int $ADVERT_INT/g" /etc/keepalived/keepalived.conf
+    fi
+
     chmod a+x $rrouter_bin_path/*.sh
 
     sed -i "s/--exec\ \$DAEMON;/--exec\ \$DAEMON\ --\ --vrrp;/g" /etc/init.d/keepalived
@@ -1431,6 +1437,9 @@ for i in $CMDLINE
       cidrsize)
         CIDR_SIZE=$VALUE
         ;;
+      advert_int)
+        ADVERT_INT=$VALUE
+        ;;
     esac
 done
 


Mime
View raw message