Don't run periodic actions for StaticScheduler
We want bindings to be fully static when using the StaticScheduler, so do not run the periodic actions in that scenario. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: I2d874ce7170cdf3d81940dbe64960247b244fe87
This commit is contained in:
parent
012f2358d2
commit
acfcd04dd4
@ -69,6 +69,7 @@ class BgpDrAgentSchedulerDbMixin(bgp_dras_ext.BgpDrSchedulerPluginBase,
|
||||
|
||||
def add_periodic_dragent_status_check(self):
|
||||
if self.bgp_drscheduler:
|
||||
if self.bgp_drscheduler.periodic_actions:
|
||||
self.add_agent_status_check_worker(
|
||||
self.remove_bgp_speaker_from_down_dragents)
|
||||
self.add_agent_status_check_worker(
|
||||
|
@ -128,6 +128,8 @@ class BgpDrAgentFilter(base_resource_filter.BaseResourceFilter):
|
||||
|
||||
class BgpDrAgentSchedulerBase(BgpDrAgentFilter):
|
||||
|
||||
periodic_actions = True
|
||||
|
||||
def _register_callbacks(self):
|
||||
registry.subscribe(self.schedule_bgp_speaker_callback,
|
||||
dr_resources.BGP_SPEAKER,
|
||||
@ -223,6 +225,8 @@ class WeightScheduler(base_scheduler.BaseWeightScheduler,
|
||||
class StaticScheduler(base_scheduler.BaseScheduler,
|
||||
BgpDrAgentFilter):
|
||||
|
||||
periodic_actions = False
|
||||
|
||||
def schedule_all_unscheduled_bgp_speakers(self, context):
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user