On 06/03/09 12:05, Nicolas Williams wrote: > On Wed, Jun 03, 2009 at 03:01:45PM -0400, Sebastien Roy wrote: > >> On Wed, 2009-06-03 at 18:29 +0100, Alan Maguire wrote: >> >>> If you just want a recipe for customers 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, >>> I believe "svccfg -s ilb:default revert last-import" >>> followed by a "svcadm refresh ilb:default" should do >>> it. >>> >> I don't quite understand why this problem is specific to ILB. Why >> wouldn't anyone running into any non-recoverable and fatal problem with >> any subsystem not want to revert back to a working configuration? In >> that vein, why wouldn't a generic solution like zfs snapshots and/or >> alternate boot environments work without including ILB-specific >> solutions? >> > > I agree, mostly. This is just a matter of documentation. There's no > need to build an ILB-specific tool to do "svccfg -s ilb:default revert > last-import". > > (My one disagreement is that ZFS snapshots and BEs are too coarse for > backing out per-service configurations. You really need SMF's snapshots > instead.) > > Nico > 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" ------------------------------------ What tool are you folks talking about.? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20090603/281b4e18/attachment.html>