Skip to content

Commit

Permalink
Do rabbit health check on worker 0 only
Browse files Browse the repository at this point in the history
contrail-api workers > 0 are producers only, this patch disables
consumer health checks on workers with id > 0.

This silences log message:
Error in rabbitmq heartbeat greenlet: Too many heartbeats missed

Change-Id: I8d3a29b5c80c770c9b2bc924fd6d8d725fc9725b
Closes-Bug: #1756968
  • Loading branch information
pjediny committed Mar 19, 2018
1 parent 8195c38 commit 276d69a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/config/api-server/vnc_cfg_api_server/vnc_db.py
Expand Up @@ -805,10 +805,14 @@ def db_client_init():
db_prefix=db_prefix, credential=db_credential)
self._zk_db = self._object_db

health_check_interval = api_svr_mgr.get_rabbit_health_check_interval()
if api_svr_mgr.get_worker_id() > 0:
health_check_interval = 0.0

self._msgbus = VncServerKombuClient(self, rabbit_servers,
rabbit_port, rabbit_user, rabbit_password,
rabbit_vhost, rabbit_ha_mode,
api_svr_mgr.get_rabbit_health_check_interval(),
health_check_interval,
**kwargs)
# end __init__

Expand Down

0 comments on commit 276d69a

Please sign in to comment.