Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1147 Discussions

cluster stop working BUG caused by cluster_manager !!Double master!!


### summary:

cluster_manager stop working and whole cluster stopped service.

### environment:

mcu server: 4.3.x

### steps:

1. two cluster_managers: A for master, B for slave

2. network flash,B became master,

3. network recover, A & B both master, B life_time is shorter, so B process exit.

4. rabbitmq queue "owt-cluster" deleted. so A can not received any message from queue "owt-cluster", all other service lost connection with cluster_manager

### reason:



handler.close = function() { request_q && request_q.destroy(); request_q = undefined; exc && exc.destroy(true); exc = undefined; };


the handler.close will called if cluster_manager process exited by calling "process.exit(1);"
and request_q.destroy() will delete the queue even if the other cluster_manager still connected on it.

### manually reproduce:

start master cluster_manager A.

modify slave cluster_manager B file: clusterManager.js at last lines for simulate

``` = function (topicChannel, clusterName, id, spec) { var manager = new ClusterManager(clusterName, id, spec); runAsCandidate(topicChannel, manager); //just using runAsMaster(topicChannel, manager); instead };


start cluster_manager B.

cluster_manager B detected "Double master" and exit.

cluster_manager A stopped service.


### suggestion:
request_q.destroy(); using option: request_q.destroy({ifUnused : true});

0 Kudos
0 Replies