incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: CS-15780 Global configuration 'account.cleanup.interval' is used by event purge thread changes: add a new global configuration event.purge.interval for event purge thread leave account.cleanup.interval only for account cleanup thread.
Date Thu, 02 Aug 2012 16:22:03 GMT
Updated Branches:
  refs/heads/master 9ee803ee0 -> 895b6a3e4


CS-15780 Global configuration 'account.cleanup.interval' is used by event purge thread
changes:
add a new global configuration event.purge.interval for event purge thread
leave account.cleanup.interval only for account cleanup thread.


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

Branch: refs/heads/master
Commit: 895b6a3e4b94710c6f8badf43683110e9c0ef56d
Parents: 9ee803e
Author: mice xia <mice_xia@tcloudcomputing.com>
Authored: Thu Aug 2 21:48:31 2012 +0530
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Thu Aug 2 21:50:44 2012 +0530

----------------------------------------------------------------------
 server/src/com/cloud/configuration/Config.java     |    1 +
 .../configuration/ConfigurationManagerImpl.java    |    1 +
 .../src/com/cloud/server/ManagementServerImpl.java |    2 +-
 server/src/com/cloud/test/DatabaseConfig.java      |    2 ++
 setup/db/db/schema-303to40.sql                     |    3 +--
 5 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/895b6a3e/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 b77537e..534f022 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -140,6 +140,7 @@ public enum Config {
  SwiftEnable(
             "Advanced", ManagementServer.class, Boolean.class, "swift.enable", "false", "enable
swift ", null),
 	
+	EventPurgeInterval("Advanced", ManagementServer.class, Integer.class, "event.purge.interval",
"86400", "The interval (in seconds) to wait before running the event purge thread", null),
 	AccountCleanupInterval("Advanced", ManagementServer.class, Integer.class, "account.cleanup.interval",
"86400", "The interval (in seconds) between cleanup for removed accounts", null),
 	AllowPublicUserTemplates("Advanced", ManagementServer.class, Integer.class, "allow.public.user.templates",
"true", "If false, users will not be able to create public templates.", null),
 	InstanceName("Advanced", AgentManager.class, String.class, "instance.name", "VM", "Name
of the deployment instance.", "instanceName"),

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/895b6a3e/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index a02c3be..4373bb3 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -254,6 +254,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager,
Configura
 
     private void populateConfigValuesForValidationSet() {
         configValuesForValidation = new HashSet<String>();
+        configValuesForValidation.add("event.purge.interval");
         configValuesForValidation.add("account.cleanup.interval");
         configValuesForValidation.add("alert.wait");
         configValuesForValidation.add("consoleproxy.capacityscan.interval");

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/895b6a3e/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index bcdafa9..227046b 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -392,7 +392,7 @@ public class ManagementServerImpl implements ManagementServer {
             s_logger.error("Unable to find HostAllocators");
         }
 
-        String value = _configs.get("account.cleanup.interval");
+        String value = _configs.get("event.purge.interval");
         int cleanup = NumbersUtil.parseInt(value, 60 * 60 * 24); // 1 day.
 
         _statsCollector = StatsCollector.getInstance(_configs);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/895b6a3e/server/src/com/cloud/test/DatabaseConfig.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/test/DatabaseConfig.java b/server/src/com/cloud/test/DatabaseConfig.java
index 6c2f44f..a6aa094 100755
--- a/server/src/com/cloud/test/DatabaseConfig.java
+++ b/server/src/com/cloud/test/DatabaseConfig.java
@@ -247,6 +247,7 @@ public class DatabaseConfig {
         s_configurationComponents.put("capacity.check.period", "management-server");
         s_configurationComponents.put("network.throttling.rate", "management-server");
         s_configurationComponents.put("multicast.throttling.rate", "management-server");
+        s_configurationComponents.put("event.purge.interval", "management-server");
         s_configurationComponents.put("account.cleanup.interval", "management-server");
         s_configurationComponents.put("expunge.delay", "UserVmManager");
         s_configurationComponents.put("expunge.interval", "UserVmManager");
@@ -330,6 +331,7 @@ public class DatabaseConfig {
         s_defaultConfigurationValues.put("restart.retry.interval", "600");
         s_defaultConfigurationValues.put("investigate.retry.interval", "60");
         s_defaultConfigurationValues.put("migrate.retry.interval", "120");
+        s_defaultConfigurationValues.put("event.purge.interval", "86400");
         s_defaultConfigurationValues.put("account.cleanup.interval", "86400");
         s_defaultConfigurationValues.put("system.vm.use.local.storage", "false");
         s_defaultConfigurationValues.put("use.local.storage", "false");

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/895b6a3e/setup/db/db/schema-303to40.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-303to40.sql b/setup/db/db/schema-303to40.sql
index 4ce8e65..39b5265 100644
--- a/setup/db/db/schema-303to40.sql
+++ b/setup/db/db/schema-303to40.sql
@@ -84,6 +84,5 @@ ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `max_data_volumes_limit
 SET SQL_SAFE_UPDATES=0;
 UPDATE `cloud`.`hypervisor_capabilities` SET `max_data_volumes_limit`=13 WHERE `hypervisor_type`='XenServer'
AND (`hypervisor_version`='6.0' OR `hypervisor_version`='6.0.2');
 SET SQL_SAFE_UPDATES=1;
-
-
+INSERT INTO `cloud`.`configuration` (`category`, `instance`, `component`, `name`, `value`,
`description`) VALUES ('Advanced', 'DEFAULT', 'management-server', 'event.purge.interval',
'86400', 'The interval (in seconds) to wait before running the event purge thread');
 


Mime
View raw message