On Mon, Apr 29, 2013 at 11:27:27AM -0700, Gurucharan Shetty wrote: > On Mon, Apr 29, 2013 at 10:04 AM, Ben Pfaff <b...@nicira.com> wrote: > > I think that it is best to try to create the pidfile as early as we can. > > If there is a conflicting pidfile, then it is best to recognize this > > early on and avoid doing other initialization work. > > > > > After looking at our code to handle forking and its aftermath, though, > > it seems like fixing this code would be more complicated and thus higher > > risk than just moving the make_pidfile() call. Do we need to backport > > this fix to branch-1.10? If so, then I think that the change you have > > here is the appropriate one. We can do better later, probably reverting > > this change as part of the improvements. > > > > You are correct in that it is not a good idea to make_pidfile so late. I > feel it may raise another set of issues. > > I just realized that my code introduces a undesirable behavior. Now, even > with a valid > pidfile, if someone manually starts a second ovs-vswitchd (not with startup > script) > , it will not terminate because it checks for the database lock before it > checks for > pidfile. > > For the short-term, does it make sense to do something like this? (I will > send a refined patch later)
I think this is better than the previous patch. Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev