[ovs-dev] [PATCH] netdev-vport: Warn on IPsec tunnels when ovs-monitor-ipsec not running.

Andrew Evans aevans at nicira.com
Sat Mar 12 10:54:26 PST 2011


On 03/12/11 10:04, Ben Pfaff wrote:
> On Sat, Mar 12, 2011 at 9:51 AM, Andrew Evans<aevans at nicira.com>  wrote:
>> On 03/12/11 08:51, Ben Pfaff wrote:
>>>
>>> On Sat, Mar 12, 2011 at 8:49 AM, Andrew Evans<aevans at nicira.com>    wrote:
>>>>
>>>> This check can be fooled by PID wrapping. It might be better to have
>>>> ovs-monitor-ipsec flock(2) its PID file and for netdev-vport to check
>>>> that
>>>> the file is locked, since the lock will be released even if the process
>>>> crashes. Or maybe it's not worth worrying about. What do you think?
>>>
>>> read_pidfile() verifies that the pidfile is locked, so this is a
>>> non-issue.
>>
>> Thanks, I see that now. So the kill(2) is unnecessary, then?
>
> I don't see how it helps.
>
> I guess that it is a cut-and-paste from similar code in vswitchd/system-stats.c.
> I don't se how it helps there, either, though.

Yeah, for my money it just obscures the fact that read_pidfile() does 
more than just read. I think the return value of read_pidfile() should 
be the sole test for running vs. not running.

-Andrew



More information about the dev mailing list