[ovs-dev] [PATCH] raft: Report disconnected in cluster/status if candidate retries election.
Han Zhou
hzhou at ovn.org
Thu Feb 25 07:14:22 UTC 2021
On Tue, Feb 23, 2021 at 5:16 AM Ilya Maximets <i.maximets at 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
:)
Acked-by: Han Zhou <hzhou at ovn.org>
> Signed-off-by: Ilya Maximets <i.maximets at 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
>
More information about the dev
mailing list