On Dec 4, 2007 6:10 PM, David Powell <David.Powell at sun.com> wrote:

> Nicolas Williams wrote:
>  > On Mon, Dec 03, 2007 at 12:34:28AM -0500, Brian Gupta wrote:
>  >> How does SMF know how to restart mysql if I manually kill the mysql
>  >> process(es) using "kill"? (It seems that the manifest doesn't indicate
> a
>  >> restart.)
>  >>
>  >> This is probably just a hole in my understanding of SMF.
>  >
>  > SMF uses a new feature of Solaris called "process contracts" that is a
>  > sort of process group, with the crucial feature that the contract
> holder
>  > can receive notification of events like "no more processes remain in
> the
>  > contract" and "a process in this contract dumped core."
>  >
>  > So when svc.startd starts your daemon it starts it in a new process
>  > contract, and when that contract runs out of processes then svc.startd
>  > will restart that service (unless it's no longer enabled, has had too
>  > many restarts, or the start method exited with an error).
>
>   Additionally, the kernel differentiates fatal signals that come from
>   processes in a contract from those that come from outside the
>   contract.  Unless you specify otherwise (by setting startd/ignore_error
>   [1]), killing just a single a process in a service will cause SMF to
>   restart the entire service.
>
>   Dave
>
> [1] See svc.startd(1M)
>

David,

Based on your subsequent email that states that "restart" is an invalid
method, what "method" does SMF use to do a complete restart, when it detects
one of the processes is down?

Nick,

Thanks the info... that brings up some old memories from when I first
experienced, and read about S10.

-- 
- Brian Gupta

http://opensolaris.org/os/project/nycosug/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20071204/89766d16/attachment.html>

Reply via email to