mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 18:43:26 +01:00
Add router.check.interval configuration for interval of checking redundant router status
This commit is contained in:
parent
2902f3d8bd
commit
c05b4dbfb8
@ -165,6 +165,7 @@ public enum Config {
|
||||
RouterCpuMHz("Advanced", NetworkManager.class, Integer.class, "router.cpu.mhz", String.valueOf(VirtualNetworkApplianceManager.DEFAULT_ROUTER_CPU_MHZ), "Default CPU speed (MHz) for router VM.", null),
|
||||
RestartRetryInterval("Advanced", HighAvailabilityManager.class, Integer.class, "restart.retry.interval", "600", "Time (in seconds) between retries to restart a vm", null),
|
||||
RouterStatsInterval("Advanced", NetworkManager.class, Integer.class, "router.stats.interval", "300", "Interval (in seconds) to report router statistics.", null),
|
||||
RouterCheckInterval("Advanced", NetworkManager.class, Integer.class, "router.check.interval", "30", "Interval (in seconds) to report redundant router status.", null),
|
||||
RouterTemplateId("Advanced", NetworkManager.class, Long.class, "router.template.id", "1", "Default ID for template.", null),
|
||||
RouterExtraPublicNics("Advanced", NetworkManager.class, Integer.class, "router.extra.public.nics", "2", "specify extra public nics used for virtual router(up to 5)", "0-5"),
|
||||
StartRetry("Advanced", AgentManager.class, Integer.class, "start.retry", "10", "Number of times to retry create and start commands", null),
|
||||
|
||||
@ -341,7 +341,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
String _mgmt_cidr;
|
||||
|
||||
int _routerStatsInterval = 300;
|
||||
int _checkRouterInterval = 30;
|
||||
int _routerCheckInterval = 30;
|
||||
private ServiceOfferingVO _offering;
|
||||
private String _dnsBasicZoneUpdates = "all";
|
||||
|
||||
@ -627,6 +627,9 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
value = configs.get("router.stats.interval");
|
||||
_routerStatsInterval = NumbersUtil.parseInt(value, 300);
|
||||
|
||||
value = configs.get("router.check.interval");
|
||||
_routerCheckInterval = NumbersUtil.parseInt(value, 30);
|
||||
|
||||
_instance = configs.get("instance.name");
|
||||
if (_instance == null) {
|
||||
_instance = "DEFAULT";
|
||||
@ -719,7 +722,12 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
||||
}else{
|
||||
s_logger.debug("router.stats.interval - " + _routerStatsInterval+ " so not scheduling the router stats thread");
|
||||
}
|
||||
_checkExecutor.scheduleAtFixedRate(new CheckRouterTask(), _checkRouterInterval, _checkRouterInterval, TimeUnit.SECONDS);
|
||||
|
||||
if (_routerCheckInterval > 0) {
|
||||
_checkExecutor.scheduleAtFixedRate(new CheckRouterTask(), _routerCheckInterval, _routerCheckInterval, TimeUnit.SECONDS);
|
||||
} else {
|
||||
s_logger.debug("router.check.interval - " + _routerCheckInterval+ " so not scheduling the redundant router checking thread");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -274,6 +274,7 @@ CREATE TABLE `cloud_usage`.`usage_vpn_user` (
|
||||
DELETE FROM configuration WHERE name='host.capacity.checker.wait';
|
||||
DELETE FROM configuration WHERE name='host.capacity.checker.interval';
|
||||
INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-server', 'disable.extraction' , 'false', 'Flag for disabling extraction of template, isos and volumes');
|
||||
INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'router.check.interval' , '30', 'Interval (in seconds) to report redundant router status.');
|
||||
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__account_id`(`account_id`);
|
||||
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__created`(`created`);
|
||||
ALTER TABLE `cloud_usage`.`usage_vpn_user` ADD INDEX `i_usage_vpn_user__deleted`(`deleted`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user