mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 11:30:23 +00:00
Fix initial collective join
Initial collective join combined with the orderly collective startup hit a chicken and egg problem. Disable initting on first enrollment to let enrollment drive that specific initialization to restore behavior.
This commit is contained in:
parent
fada9336ee
commit
a8b54ff434
@ -244,6 +244,7 @@ def get_myname():
|
||||
def handle_connection(connection, cert, request, local=False):
|
||||
global currentleader
|
||||
global retrythread
|
||||
global initting
|
||||
connection.settimeout(5)
|
||||
operation = request['operation']
|
||||
if cert:
|
||||
@ -395,6 +396,11 @@ def handle_connection(connection, cert, request, local=False):
|
||||
tlvdata.send(connection, {'error': 'Invalid token'})
|
||||
connection.close()
|
||||
return
|
||||
if not list(cfm.list_collective()):
|
||||
# First enrollment of a collective, since the collective doesn't
|
||||
# quite exist, then set initting false to let the enrollment action
|
||||
# drive this particular initialization
|
||||
initting = False
|
||||
myrsp = base64.b64encode(myrsp)
|
||||
fprint = util.get_fingerprint(cert)
|
||||
myfprint = util.get_fingerprint(mycert)
|
||||
|
Loading…
Reference in New Issue
Block a user