Add heartbeat to help with detecting hanging agents
Change-Id: I0be9be4384a12551f224fa8b9bfaaa4844efe106
This commit is contained in:
@@ -15,12 +15,14 @@
|
||||
|
||||
import copy
|
||||
import json
|
||||
import multiprocessing
|
||||
import os
|
||||
import uuid
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from shaker.agent import agent as agent_process
|
||||
from shaker.engine import config
|
||||
from shaker.engine import deploy
|
||||
from shaker.engine import executors as executors_classes
|
||||
@@ -131,6 +133,14 @@ def main():
|
||||
else:
|
||||
message_queue = messaging.MessageQueue(cfg.CONF.server_endpoint)
|
||||
|
||||
heartbeat = multiprocessing.Process(
|
||||
target=agent_process.work,
|
||||
kwargs=dict(agent_id='heartbeat',
|
||||
endpoint=cfg.CONF.server_endpoint,
|
||||
polling_interval=cfg.CONF.polling_interval))
|
||||
heartbeat.daemon = True
|
||||
heartbeat.start()
|
||||
|
||||
quorum = quorum_pkg.Quorum(
|
||||
message_queue, cfg.CONF.polling_interval,
|
||||
cfg.CONF.agent_loss_timeout, cfg.CONF.agent_join_timeout)
|
||||
|
||||
Reference in New Issue
Block a user