On Wed, Jun 03, 2009 at 12:44:00PM -0700, Sangeeta Misra wrote:
> I think what Alan has suggested is this :
> ----------------
> 
> If the ILB service daemon can detect such fatal errors
> once it has daemonized, you can use the libscf function
> 
> smf_maintain_instance(ILB_FMRI, SMF_IMMEDIATE)
> 
> (where ILB_FMRI points at the ILB service instance)
> 
> ...to kill the associated running processes and put the
> instance into maintenance. If there are fatal conditions
> detectable before daemonizing, simply exit with
> errorcode 95 (SMF_EXIT_ERR_FATAL).
> 
> If the user for some reason wants to  revert config  to that which you 
> ship in the manifest (while preserving
> the enabled/disabled state of the instance) to cover  the rare cases 
> where their configuration is unusable,
> _and_ they don't want to repair it but start from scratch,  they do this:
> 
>    o "svccfg -s ilb:default revert last-import"
>    o  "svcadm refresh ilb:default"
> ------------------------------------

Yes, that's it exactly, almost: add one more item: write an error
message to stderr right before calling smf_maintain_instance() so that
SMF can capture it in the service's log file, so that users can see it
there instead of having to hunt through syslog files.

Nico
-- 

Reply via email to