Hi Mike! Michael Goff writes: > Hi, > > I'm trying to find a way to configure Greenline to not restart a service > once it has failed and the stop method has been called. Giving it a > transient contract type prevents Greenline from stopping the service > once it has failed. I want stop to happen once the processes have > exited, but not restart. > > I've thought of some workarounds like configuring a reverse dependency > in the start method on a statefile created during the first startup. Or, > always exiting the stop method with an error code will put the service > into maintenance mode and it won't restart. > > However I'd certainly prefer to use existing Greenline functionality. > And I haven't yet found examples of what I'm trying to do.
There isn't explicit functionality like this yet. See 6197273. Can I ask why you'd want this as a developer? I can imagine as an admin deciding you'd like to get involved because the app doesn't restart cleanly. But, I'm having a more difficult time imagining why you'd want to encode fail-once semantics as a developer. The most elegant solution in the meantime, I think, would be to print something helpful to stdout and exit the stop method with an error code. $SMF_EXIT_ERR_FATAL should work in a stop method, but I haven't personally tested it. liane -- Liane Praza, Solaris Kernel Development liane.praza at sun.com - http://blogs.sun.com/lianep