>>> David Vossel <[email protected]> schrieb am 14.06.2013 um 16:21 in 
>>> Nachricht
<[email protected]>:
[...]
>> I think RAs should not rely on the fact that temp directories are clean when
>> a resource is going to be started.
> 
> The resource tmp directory has to get cleaned out on startup, if it doesn't 
> I don't think there is a good solution for resource agents to detect a stale 
> pid file from one that is current.  Nearly all the agents depend on this tmp 
> directory to get reinitialized.  If we decided not to depend on this logic, 
> every agent would have to be altered to account for this.  This would mean 
> adding a layer of complexity to the agents that should otherwise be 
> unnecessary.
[...]

But you only have to do it right once (in a procedure/function):
If the PID file exists
then
   if the PID file is newer than the time of reboot
   then
      if there is a process with this pid
        if the process having that pid matches a given pattern
        then
          the process is alive
        else
          another process has this PID; remove stale PID file
        fi
      else
        remove stale pid file
      fi
   else
     remove stale pid file
   fi
fi

Everything else ist just wrong IMHO.

Regards,
Ulrich

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to