Merge "Rename [coordination] heartbeat to hearbeat_interval"
This commit is contained in:
commit
6bbf61a67b
@ -32,8 +32,9 @@ OPTS = [
|
|||||||
'left empty, alarm evaluation won\'t do workload '
|
'left empty, alarm evaluation won\'t do workload '
|
||||||
'partitioning and will only function correctly if a '
|
'partitioning and will only function correctly if a '
|
||||||
'single instance of the service is running.'),
|
'single instance of the service is running.'),
|
||||||
cfg.FloatOpt('heartbeat',
|
cfg.FloatOpt('heartbeat_interval',
|
||||||
default=1.0,
|
default=1.0,
|
||||||
|
deprecated_name='heartbeat',
|
||||||
help='Number of seconds between heartbeats for distributed '
|
help='Number of seconds between heartbeats for distributed '
|
||||||
'coordination.'),
|
'coordination.'),
|
||||||
cfg.FloatOpt('check_watchers',
|
cfg.FloatOpt('check_watchers',
|
||||||
|
@ -224,7 +224,7 @@ class AlarmEvaluationService(cotyledon.Service):
|
|||||||
self.periodic.add(evaluate_alarms)
|
self.periodic.add(evaluate_alarms)
|
||||||
|
|
||||||
if self.partition_coordinator.is_active():
|
if self.partition_coordinator.is_active():
|
||||||
heartbeat_interval = min(self.conf.coordination.heartbeat,
|
heartbeat_interval = min(self.conf.coordination.heartbeat_interval,
|
||||||
self.conf.evaluation_interval / 4)
|
self.conf.evaluation_interval / 4)
|
||||||
|
|
||||||
@periodics.periodic(spacing=heartbeat_interval,
|
@periodics.periodic(spacing=heartbeat_interval,
|
||||||
|
@ -62,13 +62,13 @@ class TestAlarmEvaluationService(tests_base.BaseTestCase):
|
|||||||
))
|
))
|
||||||
|
|
||||||
def _do_test_start(self, test_interval=120,
|
def _do_test_start(self, test_interval=120,
|
||||||
coordination_heartbeat=1.0,
|
coordination_heartbeat_interval=1.0,
|
||||||
coordination_active=False):
|
coordination_active=False):
|
||||||
|
|
||||||
self.CONF.set_override('evaluation_interval',
|
self.CONF.set_override('evaluation_interval',
|
||||||
test_interval)
|
test_interval)
|
||||||
self.CONF.set_override('heartbeat',
|
self.CONF.set_override('heartbeat_interval',
|
||||||
coordination_heartbeat,
|
coordination_heartbeat_interval,
|
||||||
group='coordination')
|
group='coordination')
|
||||||
|
|
||||||
self._fake_pc.is_active.return_value = coordination_active
|
self._fake_pc.is_active.return_value = coordination_active
|
||||||
@ -88,7 +88,7 @@ class TestAlarmEvaluationService(tests_base.BaseTestCase):
|
|||||||
|
|
||||||
def test_start_coordinated_high_hb_interval(self):
|
def test_start_coordinated_high_hb_interval(self):
|
||||||
self._do_test_start(coordination_active=True, test_interval=10,
|
self._do_test_start(coordination_active=True, test_interval=10,
|
||||||
coordination_heartbeat=5)
|
coordination_heartbeat_interval=5)
|
||||||
|
|
||||||
def test_evaluation_cycle(self):
|
def test_evaluation_cycle(self):
|
||||||
alarm = mock.Mock(type='gnocchi_aggregation_by_metrics_threshold',
|
alarm = mock.Mock(type='gnocchi_aggregation_by_metrics_threshold',
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``[coordination] heartbeat`` parameter has been renamed to
|
||||||
|
the ``[coordination] heartbeat_interval``.
|
||||||
|
The old ``[coordination] heartbeat`` parameter is deprecated and will be
|
||||||
|
removed in a future release.
|
Loading…
Reference in New Issue
Block a user