Hi Tony,

Please find my answers inlined.

On Sat, Aug 1, 2020 at 5:55 PM Tony Liu <tonyliu0...@hotmail.com> wrote:

> When I restore 4096 LS, 4354 LSP, 256 LR and 256 LRP, (I clean up
> all DBs before restore.) it takes a few seconds to restore the nb-db.
> But onv-northd takes forever to update sb-db.
>
> I changed sb-db election timer from 1s to 10s. Then it takes just a
> few minutes for sb-db to get fully synced.
>
> How does that sb-db leader switch affect such sync?
>
> Most likely it is because SB-DB was busy and resulted in time out for the
RAFT election, and kept doing leader election (it can be confirmed by
checking the "term" number), thus never got synced. When you change the
time to 10s, it could complete the work without leader flapping.


>
> Thanks!
>
> Tony
>
> > -----Original Message-----
> > From: dev <ovs-dev-boun...@openvswitch.org> On Behalf Of Tony Liu
> > Sent: Saturday, August 1, 2020 5:26 PM
> > To: ovs-discuss <ovs-discuss@openvswitch.org>; ovs-dev <ovs-
> > d...@openvswitch.org>
> > Subject: [ovs-dev] [OVN] ovn-northd HA
> >
> > Hi,
> >
> > I have a few questions about ovn-northd HA.
> >
> > Does the lock for active ovn-northd have to be acquired from the leader
> > of sb-db?
>

Yes, because ovn-northd sets "leader_only" to true for the connection. I
remember it is also required that all lock participants must connect to the
leader for OVSDB lock to work properly.


> >
> > If ovn-northd didn't acquire the lock, it becomes standby. Does it keep
> > trying to acquire the lock, or wait for notification, or monitor the
> > active ovn-northd?
>

It is based on OVSDB notification.

>
> > If it keeps trying, what's the period?
> >
> > Say the active ovn-northd is down, the connection to sb-db is down, sb-
> > db releases the lock, so another ovn-northd can acquire it.
> > Is that correct?
> >
>
Yes

> When sb-db is busy, the connection from ovn-northd is dropped. Not sure
> > from which side it's dropped. And that triggers active ovn-northd switch.
> > Is that right?
> >
>
It is possible, but the same northd may get the lock again, if it is lucky.


> > In case that sb-db leader switchs, is that going to cause active ovn-
> > northd switch as well?
> >
>
It is possible, but the same northd may get the lock again, if it is lucky.


> > For whatever reason, in case active ovn-northd switches, is the new
> > active ovn-northd going to continue the work left by the previous leader,
> > or start all over again?
> >
>

Even for the same ovn-northd, it always recompute everything as a response
to any change. So during switch over, the new active ovn-northd doesn't
need to "continue" - it just recompute everything as usual.
When incremental processing is implemented, the new active ovn-northd may
need to do a recompute first and then handle the further changes
incrementally.
In either cases, there is no need to "continue the work left by the
previous leader".

Thanks,
Han

>
> > Thanks!
> >
> > Tony
> >
> > _______________________________________________
> > dev mailing list
> > d...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to