control_bus service has only 1 heartbeat thread
control_service class expects to have only one heartbeat thread. But the service launchs a heartbeat thread everytime when control_bus.start() is called. Thus control_bus has 3 methods and sends 3 heartbeat messages always. This adds a barrier to stop creating extra heartbeat threads in the class. Change-Id: I28f06eef3548e07367a3c3757892112a87391ce5 Closes-Bug: #1622865
This commit is contained in:
parent
40b3b3473b
commit
3785f810b5
|
@ -146,6 +146,10 @@ class DseNodeControlBus(data_service.DataService):
|
|||
|
||||
# Note(thread-safety): blocking function
|
||||
def start(self):
|
||||
if self._running:
|
||||
LOG.debug('control bus on %s already started.' % self.node.node_id)
|
||||
return
|
||||
|
||||
LOG.debug("<%s> Starting DSE control bus", self.node.node_id)
|
||||
super(DseNodeControlBus, self).start()
|
||||
|
||||
|
|
|
@ -174,7 +174,8 @@ class DseNode(object):
|
|||
self.transport, service._target, service.rpc_endpoints(),
|
||||
executor='eventlet')
|
||||
|
||||
service.start()
|
||||
if self._running:
|
||||
service.start()
|
||||
|
||||
LOG.debug('<%s> Service %s RPC Server listening on %s',
|
||||
self.node_id, service.service_id, service._target)
|
||||
|
|
Loading…
Reference in New Issue