Skip to content

Commit 689ae5a

Browse files
authored
Merge pull request #892 from richbrowne/master
Add agent liveness check to scheduler
2 parents f888f41 + 7820f9d commit 689ae5a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

f5lbaasdriver/v2/bigip/agent_scheduler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ def get_dead_agents_in_env(
100100
active=None)
101101

102102
for agent in all_agents:
103+
103104
if not plugin.db.is_eligible_agent(active=True, agent=agent):
104-
if not agent['admin_state_up']:
105+
agent_dead = plugin.db.is_agent_down(
106+
agent['heartbeat_timestamp'])
107+
if not agent['admin_state_up'] or agent_dead:
105108
return_agents.append(agent)
106109
return return_agents
107110

0 commit comments

Comments
 (0)