| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 94a146a commit dcb0db6
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1915,6 +1915,15 @@ public enum Config { | |||
| 1915 | 1915 | "the interval cloudstack sync with UCS manager for available blades in case user remove blades from chassis without notifying CloudStack", | |
| 1916 | 1916 | null), | |
| 1917 | 1917 | ||
| 1918 | + RedundantRouterVrrpInterval( | ||
| 1919 | + "Advanced", | ||
| 1920 | + NetworkOrchestrationService.class, | ||
| 1921 | + Integer.class, | ||
| 1922 | + "router.redundant.vrrp.interval", | ||
| 1923 | + "1", | ||
| 1924 | + "seconds between VRRP broadcast. It would 3 times broadcast fail to trigger fail-over mechanism of redundant router", | ||
| 1925 | + null), | ||
| 1926 | + | ||
| 1918 | 1927 | ManagementServerVendor("Advanced", ManagementServer.class, String.class, "mgt.server.vendor", "ACS", "the vendor of management server", null); | |
| 1919 | 1928 | ||
| 1920 | 1929 | private final String _category; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2339,6 +2339,9 @@ protected StringBuilder createGuestBootLoadArgs(final NicProfile guestNic, final | |||
| 2339 | 2339 | buf.append(" guestbrd=").append(brd); | |
| 2340 | 2340 | buf.append(" guestcidrsize=").append(NetUtils.getCidrSize(guestNic.getNetmask())); | |
| 2341 | 2341 | buf.append(" router_pr=").append(router.getPriority()); | |
| 2342 | + | ||
| 2343 | + int advertInt = NumbersUtil.parseInt(_configDao.getValue(Config.RedundantRouterVrrpInterval.key()), 1); | ||
| 2344 | + buf.append(" advert_int=").append(advertInt); | ||
| 2342 | 2345 | } | |
| 2343 | 2346 | ||
| 2344 | 2347 | //setup network domain | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -770,3 +770,5 @@ ALTER TABLE `cloud`.`networks` ADD COLUMN streched_l2 boolean default false; | |||
| 770 | 770 | ALTER TABLE `cloud`.`vpc` ADD COLUMN region_level_vpc boolean default false; | |
| 771 | 771 | ALTER TABLE `cloud`.`load_balancer_vm_map` ADD COLUMN instance_ip VARCHAR(40); | |
| 772 | 772 | 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`); | |
| 773 | + | ||
| 774 | + 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'; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -865,6 +865,12 @@ setup_redundant_router() { | |||
| 865 | 865 | sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/check_heartbeat.sh | |
| 866 | 866 | sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" $rrouter_bin_path/arping_gateways.sh | |
| 867 | 867 | sed -i "s/\[RROUTER_LOG\]/$rrouter_log_str/g" /opt/cloud/bin/checkrouter.sh | |
| 868 | + | ||
| 869 | + if [ $ADVERT_INT ] | ||
| 870 | + then | ||
| 871 | + sed -i "s/advert_int 1/advert_int $ADVERT_INT/g" /etc/keepalived/keepalived.conf | ||
| 872 | + fi | ||
| 873 | + | ||
| 868 | 874 | chmod a+x $rrouter_bin_path/*.sh | |
| 869 | 875 | ||
| 870 | 876 | sed -i "s/--exec\ \$DAEMON;/--exec\ \$DAEMON\ --\ --vrrp;/g" /etc/init.d/keepalived | |
@@ -1431,6 +1437,9 @@ for i in $CMDLINE | |||
| 1431 | 1437 | cidrsize) | |
| 1432 | 1438 | CIDR_SIZE=$VALUE | |
| 1433 | 1439 | ;; | |
| 1440 | + advert_int) | ||
| 1441 | + ADVERT_INT=$VALUE | ||
| 1442 | + ;; | ||
| 1434 | 1443 | esac | |
| 1435 | 1444 | done | |
| 1436 | 1445 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments