On Thu, Sep 11, 2008 at 03:12:56PM -0500, Joe Blount wrote: > >How can the stop method know if it's been called as part of a system > >shutdown or an svcadm disable invocation? > > > by calling `who -r` to get the run level.
So the reported run-level changes before the associated milestone is reached? > >>That would make SMF happy (the daemon it knows about is gone), and the > >>real daemon would be permitted to hang around as long as it needs to. > > > >What happens if the daemon crashes and has to get restarted? Surely it > >will miss events, and this will be as bad as being stopped while some > >watched filesystems are still mounted, right? Is there a deeper > >robustness issue here? > > Its not a robustness issue is either case. Its an acceptable pain issue. > > Any time the event manager misses events (due to crash, inappropriate > shutdown, etc), it will the affected file systems will be scanned when > ADM comes back up. > Its ok to scan large file systems as an error recovery solution, but its > not ok for normal startup procedure. I see. It'd be nice if a list of unreported events could be saved with the filesystem when it's unmounted. That would solve the problem. Surely that could be done for ZFS, though probably not for other filesystems. But also, provided that filesharing is disabled first, then you could simply document that events produced by local access during shutdown may be lost. Then any service that may produce such local events could declare a dependency on ADM (or milestone that depends on ADM) and you're done. Nico --