On 18 July 2016 at 10:35, Ben Pfaff <b...@ovn.org> wrote:

> On Mon, Jul 18, 2016 at 12:00:30AM -0700, Gurucharan Shetty wrote:
> > We should not use "peer" while connecting a router to a switch.
> > (Doing so, will cause ovn-northd to constantly create and destroy
> > port_binding records which causes CPU utilization of ovn-controller to
> > spike up.)
> >
> > Fixes: 31114af758c7e6 ("ovn-nbctl: Update logical router port commands.")
> > Signed-off-by: Gurucharan Shetty <g...@ovn.org>
>
> I updated the commit message to correctly say:
    We should not use "peer" while connecting a router to a switch.
    (Doing so, will cause ovn-northd to constantly create and destroy
    logical_flow records which causes CPU utilization of ovn-controller to
    spike up.)


> This seems like a bug in ovn-northd.  Did you investigate why it
> happens?
>
I think I know ( I haven't put a debugger to confirm). We create a logical
flow incorrectly and add it via ovn_lflow_add() with a switch's datapath
and a router's pipeline stage (S_ROUTER_IN_ARP_RESOLVE) here (This is when
we incorrectly set router's peer as a switch):
https://github.com/openvswitch/ovs/blob/master/ovn/northd/ovn-northd.c#L2614

In build_lflows, we go through each record of SB database's logical flows
and then do a ovn_lflow_find() which returns a negative if the data was
wrongly inserted, so it goes ahead and deleted the record from SB database.

In the next block, it will insert it back into the SB database. I will send
one additional fix. But, I think we should also assert in ovn_lflow_add if
we add a datapath with a different datapath's pipeline - not sure what is a
nice way to do that.


>
> Acked-by: Ben Pfaff <b...@ovn.org>
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to