mirror of https://github.com/apache/cloudstack.git
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.
This commit is contained in:
parent
94a146a43e
commit
dcb0db6084
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue