Change initial delay for servicegroup api reporting

Initial delay should not necessarily be equal to
report_interval. Instead make it a reasonable value
such as 5 seconds.

This is so the surprising behavior of a service not
reporting when you start it up doesn't happen if your
report interval is configured to a larger value.

For example, in an environment where there are many
services it may not be optimal to have them all reporting
every 10 seconds which is the default. You may have them
report every 5 minutes. It is confusing to start up the
service and not have it show as available until 5 minutes
later.

Fixes bug #1226370

Change-Id: I85c4146bfa465fffaf89d4c2c74e6cb4ef84cee2
This commit is contained in:
Michael Wilson
2014-02-05 18:41:42 -07:00
parent 187748630f
commit afb5cb64b5
3 changed files with 5 additions and 2 deletions

View File

@@ -36,6 +36,9 @@ servicegroup_driver_opt = cfg.StrOpt('servicegroup_driver',
CONF = cfg.CONF
CONF.register_opt(servicegroup_driver_opt)
# NOTE(geekinutah): By default drivers wait 5 seconds before reporting
INITIAL_REPORTING_DELAY = 5
class API(object):