mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-23 01:53:28 +00:00
Provide more detail on leader when leader is lost
This commit is contained in:
parent
1d59e1da8c
commit
97ca6dc48e
@ -160,11 +160,11 @@ def connect_to_leader(cert=None, name=None, leader=None):
|
||||
raise
|
||||
currentleader = leader
|
||||
#spawn this as a thread...
|
||||
follower = eventlet.spawn(follow_leader, remote, pvers)
|
||||
follower = eventlet.spawn(follow_leader, remote, pvers, leader)
|
||||
return True
|
||||
|
||||
|
||||
def follow_leader(remote, proto):
|
||||
def follow_leader(remote, proto, leader):
|
||||
global currentleader
|
||||
cleanexit = False
|
||||
try:
|
||||
@ -176,8 +176,8 @@ def follow_leader(remote, proto):
|
||||
log.log({'info': 'Previous following cleanly closed',
|
||||
'subsystem': 'collective'})
|
||||
return
|
||||
log.log({'info': 'Current leader has disappeared, restarting '
|
||||
'collective membership', 'subsystem': 'collective'})
|
||||
log.log({'info': 'Current leader ({0}) has disappeared, restarting '
|
||||
'collective membership'.format(leader), 'subsystem': 'collective'})
|
||||
# The leader has folded, time to startup again...
|
||||
cfm.stop_following()
|
||||
currentleader = None
|
||||
|
Loading…
Reference in New Issue
Block a user