On 2/25/21 8:14 AM, Han Zhou wrote:
> 
> 
> On Tue, Feb 23, 2021 at 5:16 AM Ilya Maximets <i.maxim...@ovn.org 
> <mailto:i.maxim...@ovn.org>> wrote:
>>
>> If election times out for a server in 'candidate' role it sets
>> 'candidate_retrying' flag that notifies that storage is disconnected
>> and client should re-connect.  However, cluster/status command
>> reports 'Status: cluster member' and that is misleading.
>> Reporting "disconnected from the cluster (election timeout)" instead.
>>
>> Fixes: 1b1d2e6daa56 ("ovsdb: Introduce experimental support for clustered 
>> databases.")
> 
> candidate_retrying flag was introduced in a patch later than the above one :)

Yeah, I know. :)
But the same logic was there.  raft_is_connected() was 'false' for a
RAFT_CANDIDATE while cluster/status reported 'cluster member'.
TBH, I'm not going to backport that far anyway.

> 
> Acked-by: Han Zhou <hz...@ovn.org <mailto:hz...@ovn.org>>
> 
>> Signed-off-by: Ilya Maximets <i.maxim...@ovn.org <mailto:i.maxim...@ovn.org>>
>> ---
>>  ovsdb/raft.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/ovsdb/raft.c b/ovsdb/raft.c
>> index 0fb1420fb..192f7f0a9 100644
>> --- a/ovsdb/raft.c
>> +++ b/ovsdb/raft.c
>> @@ -4498,6 +4498,8 @@ raft_unixctl_status(struct unixctl_conn *conn,
>>                    : raft->leaving ? "leaving cluster"
>>                    : raft->left ? "left cluster"
>>                    : raft->failed ? "failed"
>> +                  : raft->candidate_retrying
>> +                      ? "disconnected from the cluster (election timeout)"
>>                    : "cluster member");
>>      if (raft->joining) {
>>          ds_put_format(&s, "Remotes for joining:");
>> --
>> 2.26.2
>>

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to