[ovs-dev] [PATCH] testsuite: release resources when vswitch exits.

Flavio Leitner fbl at redhat.com
Thu Jun 8 17:36:30 UTC 2017


On Thu, Jun 08, 2017 at 10:16:11AM -0700, Ben Pfaff wrote:
> On Wed, Jun 07, 2017 at 05:56:36PM -0700, Joe Stringer wrote:
> > On 7 June 2017 at 17:36, Joe Stringer <joe at ovn.org> wrote:
> > > On 7 June 2017 at 13:58, Flavio Leitner <fbl at redhat.com> wrote:
> > >> This change the testsuite macro to release the resources
> > >> configured by ovs-vswitchd when exiting as it used to be.
> > >>
> > >> Fixes: 0f28164be02ac ("netdev-linux: make tap devices persistent")
> > >> Fixes: fe13ccdca6a22 ("vswitchd: Add --cleanup option to the 'appctl
> > >>                        exit' command")
> > >>
> > >> Reported-by: Eric Garver <e at erig.me>
> > >> Signed-off-by: Flavio Leitner <fbl at redhat.com>
> > >
> > > Thanks for the fix, applied to master.
> > 
> > While this fixes successful test runs with OVS_APP_EXIT_AND_WAIT(), if
> > anything fails in the middle of the test then OVS isn't going to
> > perform cleanup, which will leave devices hanging around, which will
> > cause subsequent tests to fail.
> > 
> > I think we need to amend the _OVS_VSWITCHD_START macro as well, for
> > the following line:
> > on_exit "kill `cat ovs-vswitchd.pid`"
> > 
> > This should use appctl to do a tidy cleanup as well.
> 
> Be careful about that.  There needs to be a fallback to kill vswitchd
> even if it doesn't exit gracefully.  The test framework waits for all
> processes to exit, so the testsuite will ultimately hang if a process
> never does.

I sent this patch to fix it which I think addresses both concerns:
https://mail.openvswitch.org/pipermail/ovs-dev/2017-June/333693.html

-- 
Flavio


More information about the dev mailing list