Revise the default max value of cluster check
This patch revises the default max value of cluster check. Cluster check is a time-consuming action ,it is particular .So we add a new config option 'check_interval_max' which's defalut is large than 'periodic_interval_max'. Change-Id: I06b4ecf7181e436fcb06f27eb8defce48c27a24a
This commit is contained in:
parent
c16ec58240
commit
60537197c3
@ -43,6 +43,9 @@ engine_opts = [
|
||||
cfg.IntOpt('periodic_interval_max',
|
||||
default=120,
|
||||
help='Maximum seconds between periodic tasks to be called'),
|
||||
cfg.IntOpt('check_interval_max',
|
||||
default=3600,
|
||||
help='Maximum seconds between cluster check to be called'),
|
||||
cfg.IntOpt('periodic_fuzzy_delay',
|
||||
default=10,
|
||||
help='Range of seconds to randomly delay when starting the'
|
||||
|
@ -304,10 +304,10 @@ class HealthManager(service.Service):
|
||||
cid = entry['cluster_id']
|
||||
ctype = entry['check_type']
|
||||
if ctype == consts.NODE_STATUS_POLLING:
|
||||
interval = min(entry['interval'], cfg.CONF.periodic_interval_max)
|
||||
interval = min(entry['interval'], cfg.CONF.check_interval_max)
|
||||
timer = self.TG.add_dynamic_timer(self._poll_cluster,
|
||||
None, # initial_delay
|
||||
None, # periodic_interval_max
|
||||
None, # check_interval_max
|
||||
cid, interval)
|
||||
entry['timer'] = timer
|
||||
elif ctype == consts.LIFECYCLE_EVENTS:
|
||||
|
Loading…
Reference in New Issue
Block a user