Good to know! I recall I read somewhere saying only the leader takes write request. I will double check!
Well, in that case, I have another question, why is such leader role required? In a quorum based cluster, all nodes are equal. And why does ovn-northd have to connect to the leader?
Guess I will need to read more about RAFT:)
Thanks!
Tony
On Jul 23, 2020 4:26 PM, Han Zhou <[email protected]> wrote:
On Thu, Jul 23, 2020 at 4:07 PM <[email protected]> wrote:
>
> Thanks Han for the prompt responses!
> That option is ok for reading. If I want to write, I have to connect to the leader, right? Then my question remains, how does ovn-sbctl find out how to connect to the leader?>RAFT doesn't require you to connect to leader for writing. You can connect to any node and write.However, if for any reason you want to connect to the leader, you need to specify the DB connection method as: <server1>,<server2>,...,<serverN>. For example: tcp:10.0.0.2:6641,tcp:10.0.0.3:6641,tcp:10.0.0.4:6641.You can read more details about OVSDB clustering in manpage ovsdb(7).Thanks,Han> Thanks again!
>
> Tony
>
> On Jul 23, 2020 3:57 PM, Han Zhou <[email protected]> wrote:
>
>
>
> On Thu, Jul 23, 2020 at 3:43 PM Tony Liu <[email protected]> wrote:
> >
> > Hi,
> >
> > In case of ovsdb cluster, when I run ovn-sbctl, it connects to the unix socket of local sb-db.
> > If local sb-db is not the leader, ovn-sbctl tries another server to look for the leader.
> > How does ovn-sbctl connect to another server? By which connection?
> > How does ovn-sbctl know the connection?
> > Or the local sb-db asks to be the leader to respond ovn-sbctl?
> > I can't figure out how it works from verbose messages.
> > Any help to clarify is appreciated!
> >
> >
> > Thanks!
> >
> > Tony
>
> If you don't intentionally try to connect to the leader, you can use ovn-sbctl --no-leader-only ... to avoid the retry.
> If you want to avoid typing this option every time, you can export OVN_SBCTL_OPTIONS"="--no-leader-only", and then just run ovn-sbctl ...
> (does this answer your question?)
>
> Thanks,
> Han
>
>
_______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
