Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions f5_openstack_agent/lbaasv2/drivers/bigip/agent_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
default=10,
help='Seconds between periodic task runs'
),
cfg.IntOpt(
'update_operating_status_interval',
default=30,
help='Seconds between update_operating_status task runs'
),
cfg.BoolOpt(
'start_agent_admin_state_up',
default=True,
Expand Down Expand Up @@ -133,6 +138,7 @@
]

PERIODIC_TASK_INTERVAL = 10
UPDATE_OPERATING_STATUS_INTERVAL = 30


class LogicalServiceCache(object):
Expand Down Expand Up @@ -239,6 +245,10 @@ def __init__(self, conf):
global PERIODIC_TASK_INTERVAL
PERIODIC_TASK_INTERVAL = self.conf.periodic_interval

global UPDATE_OPERATING_STATUS_INTERVAL
UPDATE_OPERATING_STATUS_INTERVAL = \
self.conf.update_operating_status_interval

# Create the cache of provisioned services
self.cache = LogicalServiceCache()
self.last_resync = datetime.datetime.now()
Expand Down Expand Up @@ -497,7 +507,7 @@ def recover_errored_devices(self, context):
self.lbdriver.recover_errored_devices()

@periodic_task.periodic_task(
spacing=constants_v2.UPDATE_OPERATING_STATUS_INTERVAL)
spacing=UPDATE_OPERATING_STATUS_INTERVAL)
def scrub_dead_agents_in_env_and_group(self, context):
"""Triggering a dead agent scrub on the controller."""
LOG.debug("running periodic scrub_dead_agents_in_env_and_group")
Expand All @@ -508,9 +518,10 @@ def scrub_dead_agents_in_env_and_group(self, context):
self.conf.environment_group_number)

@periodic_task.periodic_task(
spacing=constants_v2.UPDATE_OPERATING_STATUS_INTERVAL)
spacing=UPDATE_OPERATING_STATUS_INTERVAL)
def update_operating_status(self, context):
"""Update pool member operational status from devices to controller."""
LOG.debug('running update_operating_status:')
if not self.plugin_rpc:
return

Expand Down
2 changes: 0 additions & 2 deletions f5_openstack_agent/lbaasv2/drivers/bigip/constants_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

# Service resync interval
RESYNC_INTERVAL = 300
UPDATE_OPERATING_STATUS_INTERVAL = 30


# Topic for tunnel notifications between the plugin and agent
TUNNEL = 'tunnel'
Expand Down