<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi, Han,</div><div>             I do not  encounter that problem these days  after using this patch.  I think there is no COMPACT in my environment.  Actaully , I don't see any snap file in /var/lib/openvswitch.  </div><div><br></div><div>Thanks,</div><div>Yun</div><br><br><br><br><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br>At 2019-12-04 10:01:16, "Han Zhou" <hzhou@ovn.org> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>Could you see if this patch fixes your problem?</div><div><a href="https://patchwork.ozlabs.org/patch/1203951/">https://patchwork.ozlabs.org/patch/1203951/</a></div><div><br></div><div>Thanks,</div><div>Han<br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 2, 2019 at 12:28 AM Han Zhou <<a href="mailto:hzhou@ovn.org">hzhou@ovn.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sorry for the late reply. It was holiday here.</div><div>I didn't see such problem when there is no compaction. Did you see this problem when DB compaction didn't happen? The difference is that after compaction the RAFT log doesn't have any entries and all the data is in the snapshot.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 29, 2019 at 12:11 AM taoyunupt <<a href="mailto:taoyunupt@126.com" target="_blank">taoyunupt@126.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,Han<br>
          Hope to receive your reply.<br>
<br>
<br>
Thanks,<br>
Yun<br>
<br>
<br>
<br>
在 2019-11-28 16:17:07,"taoyunupt" <<a href="mailto:taoyunupt@126.com" target="_blank">taoyunupt@126.com</a>> 写道:<br>
<br>
Hi,Han<br>
         Another question. NO COMPACT. If restart a follower , leader sender some entries during the  break time, when it has started, if it also happend to this problem?  What is the difference between simply restart and COMPACT with restart ?<br>
<br>
<br>
Thanks,<br>
Yun<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
在 2019-11-28 13:58:36,"taoyunupt" <<a href="mailto:taoyunupt@126.com" target="_blank">taoyunupt@126.com</a>> 写道:<br>
<br>
Hi,Han<br>
         Thanks for your reply.  I think maybe we can disconnect the failed follower from the Haproxy then synchronize the date, after all completed, reconnect it to Haproxy again. But I do not know how to synchronize actually.  <br>
         It is just my naive idea. Do you have some suggestion about how to fix this problem.  If not very completed, I wii have a try.<br>
<br>
<br>
Thanks <br>
Yun<br>
<br>
<br>
<br>
<br>
<br>
<br>
在 2019-11-28 11:47:55,"Han Zhou" <<a href="mailto:hzhou@ovn.org" target="_blank">hzhou@ovn.org</a>> 写道:<br>
<br>
<br>
<br>
On Wed, Nov 27, 2019 at 7:22 PM taoyunupt <<a href="mailto:taoyunupt@126.com" target="_blank">taoyunupt@126.com</a>> wrote:<br>
><br>
> Hi,<br>
>     My OVN cluster has 3 OVN-northd nodes, They are proxied by Haproxy with a VIP. Recently, I restart OVN cluster frequently.  One of the members report the logs below.<br>
>     After read the code and paper of RAFT, it seems normal process ,If the follower does not find an entry in its log with the same index and term, then it refuses the new entries.<br>
>     I think it's reasonable to refuse. But, as we could not control Haproxy or some proxy maybe, so it will happen error when an session assignate to the failed follower.<br>
>    <br>
>     Does have some means or ways to solve this problem. Maybe we can kick off the failed follower or disconnect it from the haproxy then synchronize the date ?  Hope to hear your suggestion.<br>
><br>
><br>
> 2019-11-27T14:22:17.060Z|00240|raft|INFO|rejecting append_request because previous entry 1103,50975 not in local log (mismatch past end of log)<br>
> 2019-11-27T14:22:17.064Z|00241|raft|ERR|Dropped 34 log messages in last 12 seconds (most recently, 0 seconds ago) due to excessive rate<br>
> 2019-11-27T14:22:17.064Z|00242|raft|ERR|internal error: deferred append_reply message completed but not ready to send because message index 14890 is past last synced index 0: a2b2 append_reply "mismatch past end of log": term=1103 log_end=14891 result="inconsistency"<br>
> 2019-11-27T14:22:17.402Z|00243|raft|INFO|rejecting append_request because previous entry 1103,50975 not in local log (mismatch past end of log)<br>
><br>
><br>
> [root@ovn1 ~]#  ovs-appctl -t /var/run/openvswitch/ovnsb_db.ctl cluster/status OVN_Southbound<br>
> a2b2<br>
> Name: OVN_Southbound<br>
> Cluster ID: 4c54 (4c546513-77e3-4602-b211-2e200014ad79)<br>
> Server ID: a2b2 (a2b2a9c5-cf58-4724-8421-88fd5ca5d94d)<br>
> Address: tcp:<a href="http://10.254.8.209:6644" rel="noreferrer" target="_blank">10.254.8.209:6644</a><br>
> Status: cluster member<br>
> Role: leader<br>
> Term: 1103<br>
> Leader: self<br>
> Vote: self<br>
><br>
> Log: [42052, 51009]<br>
> Entries not yet committed: 0<br>
> Entries not yet applied: 0<br>
> Connections: ->beaf ->9a33 <-9a33 <-beaf<br>
> Servers:<br>
>     a2b2 (a2b2 at tcp:<a href="http://10.254.8.209:6644" rel="noreferrer" target="_blank">10.254.8.209:6644</a>) (self) next_index=15199 match_index=51008<br>
>     beaf (beaf at tcp:<a href="http://10.254.8.208:6644" rel="noreferrer" target="_blank">10.254.8.208:6644</a>) next_index=51009 match_index=0<br>
>     9a33 (9a33 at tcp:<a href="http://10.254.8.210:6644" rel="noreferrer" target="_blank">10.254.8.210:6644</a>) next_index=51009 match_index=51008<br>
<br>
><br>
<br>
<br>
I think it is a bug. I noticed that this problem happens when the cluster is restarted after DB compaction. I mentioned it in one of the test cases: <a href="https://github.com/openvswitch/ovs/blob/master/tests/ovsdb-cluster.at#L252" rel="noreferrer" target="_blank">https://github.com/openvswitch/ovs/blob/master/tests/ovsdb-cluster.at#L252</a><br>
I also mentioned another problem related to compaction: <a href="https://github.com/openvswitch/ovs/blob/master/tests/ovsdb-cluster.at#L239" rel="noreferrer" target="_blank">https://github.com/openvswitch/ovs/blob/master/tests/ovsdb-cluster.at#L239</a><br>
I was planning to debug these but didn't get the time yet. I will try to find some time next week (it would be great if you could figure it out and submit patches).<br>
<br>
<br>
<br>
Thanks,<br>
Han<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openvswitch.org" target="_blank">dev@openvswitch.org</a><br>
<a href="https://mail.openvswitch.org/mailman/listinfo/ovs-dev" rel="noreferrer" target="_blank">https://mail.openvswitch.org/mailman/listinfo/ovs-dev</a><br>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>