On 11/7/07, Christine Tran <Christine.Tran at sun.com> wrote: > Peter Tribble wrote: > > I've been asked to create a setup in which there are several instances > > of an application, with one and only one running at a time. > > There is a dependency type that sounds just like the job for this > situation: exclude_all. The dependency is satisfied when !{service}, > man smf(5) for more. Never seen this used, so not sure what the framers > intended.
Hm. Looks like it could help - simply make each service exclude all the others. I'll have to try this - it could help with the "there can be only one" part of the requirement. At least, it provides a mechanism to enforce it rather than relying on users being cooperative. Without actually trying it, it doesn't help ensure that one of the services is running; nor does it help transition the active service from one service to another. Another problem that's just occurred to me is that adding another instance means I have to update the dependencies of all the other members of the group. > The problematic thing I see is that the dependency is on service, and > you are working with instances. Unless you do have properties that are > inherited from service to instance, is it possible to make sendmail, > postfix, qmail, exim all different *services*, instead of smtp:instance? For my case, I can define them how I want, so that's not a problem. (As a general comment, I consider instances to be separate services, with the service/instance demarcation being a helpful way of showing how service are related. I'm aware that SMF reads rather more into the relationship than that...) > Just my thoughts on a hack, would love to hear how you make out after > you're done. Thanks for the hint. -- -Peter Tribble http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/