HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-devel] Stopping condor fails with stale PID file [PATCH]



On Mar 6, 2012, at 6:22 AM, Michael Hanke wrote:

> on a system with a stale PID file (no condor_master running, e.g. after
> a crash of the master) the init script's stop action fails, because it
> waits for a non-existing process to end. This behavior can cause, for
> example, a Debian package upgrade to fail. The attached patch addresses
> this problem. I'd be glad if you could have a look at it and let me know
> whether there are undesired side-effect of such a fix.


If I'm reading condor.boot.rpm correctly, your patch calls ps with no arguments and searches the output for a line starting with the condor_master's pid. I see two problems. First, if ps is called with no arguments, it won't include condor_master in its results. Second, if a pid is less than 5 digits long, ps adds spaces in front of it. This would cause your patch to not notice the condor_master's pid.

+--------------------------------+-----------------------------------+
|           Jaime Frey           | I used to be a heavy gambler.     |
|       jfrey@xxxxxxxxxxx        | But now I just make mental bets.  |
|                                | That's how I lost my mind.        |
+--------------------------------+-----------------------------------+