diff --git a/confluent_server/bin/collective b/confluent_server/bin/collective index e2ffd366..a6465ef4 100644 --- a/confluent_server/bin/collective +++ b/confluent_server/bin/collective @@ -77,6 +77,8 @@ def show_collective(): if 'error' in res['collective']: print(res['collective']['error']) return + if 'quorum' in res['collective']: + print('Quorum: {0}'.format(res['collective']['quorum'])) print('Leader: {0}'.format(res['collective']['leader'])) if 'active' in res['collective']: if res['collective']['active']: diff --git a/confluent_server/confluent/collective/manager.py b/confluent_server/confluent/collective/manager.py index 56b18ac9..bfce9181 100644 --- a/confluent_server/confluent/collective/manager.py +++ b/confluent_server/confluent/collective/manager.py @@ -185,13 +185,6 @@ def handle_connection(connection, cert, request, local=False): 'enabled on this ' 'system'}}) return - try: - cfm.check_quorum() - except exc.DegradedCollective: - tlvdata.send(connection, - {'collective': - {'error': 'Collective does not have quorum'}}) - return if follower: linfo = cfm.get_collective_member_by_address(currentleader) remote = socket.create_connection((currentleader, 13001)) @@ -217,6 +210,11 @@ def handle_connection(connection, cert, request, local=False): else: collinfo = {} populate_collinfo(collinfo) + try: + cfm.check_quorum() + collinfo['quorum'] = True + except exc.DegradedCollective: + collinfo['quorum'] = False tlvdata.send(connection, {'collective': collinfo}) return if 'invite' == operation: