[ovs-dev] [PATCH v2] worker: Prevent worker from being responsible for pidfile deletion.

Gurucharan Shetty shettyg at nicira.com
Tue Apr 30 00:23:58 UTC 2013


On Mon, Apr 29, 2013 at 3:25 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Mon, Apr 29, 2013 at 01:34:55PM -0700, Gurucharan Shetty wrote:
> > Currently we are creating the worker process after creation of the
> pidfile.
> > This means that the the responsibility of deleting the pidfile after
> process
> > termination rests with the worker process.
> >
> > When we restart openvswitch using the startup scripts, we SIGTERM the
> main
> > process and once it is cleaned up, we start ovs-vswitchd again. This
> results
> > in a race condition. The new ovs-vswitchd will create a pidfile because
> it is
> > unlocked. But, if the old worker process exits after the start of new
> > ovs-vswitchd, it will simply delete the pidfile underneath the new
> ovs-vswitchd.
> > This will eventually result in multiple ovs-vswitchd daemons.
> >
> > This patch gives the responsibility of deleting the pidfile to the main
> > process.
> >
> > Bug #16669.
> > Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
>
> Looks good, thanks.
>
Thank you. I pushed both the patches from this commit to master, 1.11 and
1.10.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130429/26ff2e63/attachment-0003.html>


More information about the dev mailing list