Robert Sturrock wrote:
 > Hello SMF List.
 >
 > We're trying to develop an SMF configuration for Hylafax on Solaris
 > 10/SPARC.  (We are running the Hylafax build provided from
 > blastwave.org, which does not include an SMF setup - although we've
 > modified slightly the default init script for use with SMF).
 >
 > The Hylafax startup forks _two_ daemons: faxq and hfaxd.
 >
 > "faxq" dies from time to time - we would like to use SMF to
 > automatically restart this.  However, our (naive) configuration does
 > not cater for this situation as SMF won't stop/start the service as a
 > whole unless _both_ "faxq" and "hfaxd" have exited.
 >
 > What is the best way to develop a configuration to cater for this?
 >
 > We would prefer not to have two separate SMF services.  (We are happy
 > for "hfaxd" to be restarted in the event that "faxq" has exited or
 > vice versa).

   If that's the case, and "faxq" is actually crashing and not simply
   calling exit(), then removing this:

 >     <property_group name='startd' type='framework'>
 >      <propval name='ignore_error' type='astring' value='core,signal'/>
 >     </property_group>

   should solve your problem.

 > Should this be done using (1) dependencies ("hfaxd" could depend on
 > "faxq"), or (2) is there a simple way to tell SMF "if _any_ process dies,
 > restart the whole service"?

   Removing the ignore_error property will accomplish (2), assuming the
   process is dying in a way SMF can externally identify as a failure
   (i.e. given the circumstances, if it's dumping core).

   You can certainly do (1), but you can only express dependencies
   between services.  This would therefore require separate services for
   faxq and hfaxd.

   Dave


Reply via email to