[ovs-dev] [PATCH] ovs-lib: Handle daemon segfaults during exit.

Guru Shetty guru.ovn at gmail.com
Mon Sep 21 19:57:45 UTC 2020


On Mon, 21 Sep 2020 at 10:53, Yi-Hung Wei <yihung.wei at gmail.com> wrote:

> On Fri, Sep 18, 2020 at 9:54 AM Gurucharan Shetty <guru at ovn.org> wrote:
> >
> > Currently, we terminate a daemon by trying
> > "ovs-appctl exit", "SIGTERM" and finally "SIGKILL".
> > But the logic fails if during "ovs-appctl exit", the
> > daemon crashes (segfaults). The monitor will automatically
> > restart the daemon with a new pid. The current logic of
> > checking the non-existance of old pid succeeds and we proceed
> > with the assumption that the daemon is dead.
> >
> > This is a problem during OVS upgrades as we will continue
> > to run the older version of OVS.
> >
> > With this commit, we take care of this situation. If there
> > is a segfault, the pidfile is not deleted. So, we wait a
> > little to give time for the monitor to restart the daemon
> > (which is usually instantaneous) and then re-read the pidfile.
> >
> > VMware-BZ: #2633995
> > Signed-off-by: Gurucharan Shetty <guru at ovn.org>
> > ---
>
> Thanks for the patch. I think it does fix a case when --monitor is
> specified and ovs crash during "ovs-appctl exit".
>
> Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
>

Thank you. I applied this to master.


More information about the dev mailing list