[ovs-dev] [PATCH] ovn-controller: add restart test

Ben Pfaff blp at ovn.org
Wed Mar 23 23:23:31 UTC 2016


On Tue, Mar 22, 2016 at 04:37:16PM -0700, Ramu Ramamurthy wrote:
> > This adds a test for this invariant for a specific test case, which is
> > useful.  However, I believe that this should be a universal invariant
> > for ovn-controller, so that at any time if ovn-controller is restarted
> > gracefully after it has converged, it should preserve these flows.  Is
> > that true?  If so, then it would be more useful to add such a check to
> > *every* test case for OVN.
> >
> > What do you think?
> >
> > Thanks,
> >
> > Ben.
> 
> I am finding that, after a graceful exit of ovn-controller
> using "ovs-appctl -t ovn-controller exit", and then a restart of the
> ovn-controller,
> the flows before restart and after restart dont match on table 0 in 1 out of
> 2 runs (or 1 out of 3 runs).
> 
> This is because, localnet ports in the test
> are being deleted and recreated in such failing runs - and therefore, their
> ofports are mismatching in the flow-table (before and after restart).
> 
> Localnet ports are being deleted and recreated in the failing runs
> because, ovn-controller is cleaning up the chassis row during graceful
> exit, and upon startup there still seems
> to be a race between patch_run and binding_run when the chassis does
> not exist, I am still
> chasing this down.

Should that behavior of ovn-controller on graceful restart be considered
a bug, though?  If so, then we should probably fix it and add a test (or
modify multiple tests, as I suggested above) to make sure that it does
not recur.

> Thats why the test as currently coded is killing the ovn-controller
> ungracefully (kill -9) and restarting
> it. As such the restart test and expected invariance of flows seems useful.

I guess that kill -9 and restart can be a useful test too.



More information about the dev mailing list