[ovs-dev] [PATCH v2 RFC] ovs-lib: try to call exit before killing

Ben Pfaff blp at ovn.org
Wed Dec 16 08:27:45 UTC 2015


On Wed, Dec 16, 2015 at 09:58:56AM +0300, Ilya Maximets wrote:
> 
> 
> On 16.12.2015 09:53, Ben Pfaff wrote:
> > On Wed, Dec 16, 2015 at 09:50:56AM +0300, Ilya Maximets wrote:
> >> While killing OVS may not free all allocated resources.
> >>
> >> Eample:
> >> 	Socket for vhost-user port will stay in a system
> >> 	after 'systemctl stop openvswitch' and opening
> >> 	that port after restart will fail.
> >>
> >> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> >> ---
> >>
> >> version 2:
> >> 	* added '-T 1'
> >> 	* '-t $1' --> '-t $rundir/$1.$pid.ctl'
> > 
> > Thanks.
> > 
> > Have you tested it?
> > 
> 
> Yes. On my setup it works.
> Only reason why it put RFC to that patch:
> Is all daemons have unixctl exit command? Or we can just let ovs-appctl to fail here
> in that case?

I think that all of our current daemons do have an "exit" command, but
it might be worth removing the "2" after EXIT.  The purpose of the
delays in this chain is to wait a bit for a given signal to be processed
through the operating system and the daemon, but EXIT should wait until
the process has actually exited, or at least get very close to that.
Maybe a short delay like .1 would be reasonable, to allow for a brief
race window.



More information about the dev mailing list