On Feb 17, 2008 8:04 PM, Nicolas Dorfsman <ndo at unikservice.com> wrote: > > Le 17 f?vr. 08 ? 20:10, Peter Tribble a ?crit : > > > Running S10, pretty recent, we've noticed the following behaviour: > > > > The 'svcadm restart' command doesn't always work, and often leaves > > our services in maintenance. > > > > The problem seems to be that a restart does a stop followed by > > a start, and if the stop fails (the process doesn't die cleanly, so > > then smf comes along and kills the process) then the service is > > immediately put into maintenance with (apparently) no attempt > > to start it back up. > > Well, the concept is to have something you can trust in. > How could you trust SMF if it decides by itself to ignore a bad stop ?
The user expectation here, I believe, is that the service should be started. At least, that's what the users are telling me. (Telling me rather strongly, at that.) > > In terms of availability, this is the wrong way round, as it has > > taken crucial services offline for us (and without any indication to > > the user). > > Without indication ? Is the maintenance state not an indication ? Only if the user looks. It's about trust - my users are starting to not trust smf to do the right thing as a result. > > Why doesn't it try to start the service back up even if the stop > > fails? > > Any service in maintenance state must be cleared (svcs clear) before > accept any other action. Is a service normally placed in maintenance in the case that a normal disable fails in the same way? (Do you need a clear - normally the users do disable/enable rather than clear.) > > Or is there some other way of telling it that it's OK if the stop > > method failed? > > Do you really want to do that ? Yep. I want the service started. That's the state it's meant to be in. And normally, if you disable a service and you get the same error on the way down, then the service isn't placed into maintenance. The restart case doesn't behave the same way as disable + enable. > > (The application is tomcat, which doesn't always shut down > > when you ask it to nicely.) > > I guess smf specialist on this list may provide you a best howto. > Anyway, the easiest is to modify the stop method...forcing it to be > happy in any circumstance. I'm really wanting to avoid having to replicate all the functionality of SMF in my method scripts, and to have to consider in advance every possible failure mode when SMF ought to be able to handle it all for me. -- -Peter Tribble http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/