Nikhil wrote:
> Hi, is there anyway in the profile, where I can mention of the 
> dependency of a file only for a stop/start method like I have a binary 
> installed under network filesystem, which creates a pid informative 
> file upon its start and removes the file upon the exit.
> Since this binary installation (and the pid informative file is also 
> in the same network location hierarchy) is under network filesystem, 
> it is possible that any host accessing the file can startoff the 
> binary but because of the existence of a pid, it can be restricted to 
> only one host.
> Same way, if I manage to make this binary SMFized by writing a profile 
> for it , can I restrict the service to start only if and only if there 
> is no pid file and attempt to stop should be made only if the pidfile 
> exists, but here on a condition that I do not want to have a method 
> defined for my new service. I am not sure if this has already been 
> addressed. Please advice and point me to the associative urls.
>  
> Thanks and Regards,
> Nikhil
Just to be sure I understand the scenario. You have a service locally 
installed on multiple hosts but only one service instance can run at any 
given time on that group of hosts. The network mounted pid file is what 
the local services use to determine whether or not an instance is 
already running. Simply put, the non-existence of a network pid file 
indicates that no instance is running and vice versa? Moreover, the 
service is enabled on all hosts and should really be running on only one 
host? Can you have the file validation logic in the start method and the 
first running instance will create the pid file which prevents the other 
instances(on other hosts) to run? Perhaps, the other instance can put 
themselves in temporary disable state.

Am I understanding your problem correctly?
-tony


Reply via email to