summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-04-11 17:30:58 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-04-11 17:30:58 -0700
commit5182bcaf2a9e8eda0e7d7f1cdfc6260e924a409d (patch)
treeae263ca645141461fbde4929ac75bb78f03dc305
parent6b8d5eec07307c54c2756a4d3428297880c156bc (diff)
Allow for the power state interval to be configured.
The power state interval right now is hard coded to 600 seconds. In order to allow deployers to change this timing (and determine) the side-effects of that change it is useful to allow this value to be configured instead of static. DocImpact Change-Id: I9baf34f9b132dc20fcc096f86fa0e5794fc06312
-rwxr-xr-xnova/compute/manager.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 687594ab9..5feabc060 100755
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -110,6 +110,10 @@ interval_opts = [
cfg.IntOpt('bandwidth_poll_interval',
default=600,
help='interval to pull bandwidth usage info'),
+ cfg.IntOpt('sync_power_state_interval',
+ default=600,
+ help='interval to sync power states between '
+ 'the database and the hypervisor'),
cfg.IntOpt("heal_instance_info_cache_interval",
default=60,
help="Number of seconds between instance info_cache self "
@@ -3727,7 +3731,8 @@ class ComputeManager(manager.SchedulerDependentManager):
capability['host_ip'] = CONF.my_ip
self.update_service_capabilities(capabilities)
- @manager.periodic_task(spacing=600.0, run_immediately=True)
+ @manager.periodic_task(spacing=CONF.sync_power_state_interval,
+ run_immediately=True)
def _sync_power_states(self, context):
"""Align power states between the database and the hypervisor.