[OpenIndiana-discuss] SMF "svcadm restart-or-clear-or-start" action
Peter Tribble
peter.tribble at gmail.com
Mon Feb 25 19:17:46 UTC 2013
On Mon, Feb 25, 2013 at 3:03 PM, Jim Klimov <jimklimov at cos.ru> wrote:
> FWIW, I added this RFE to illumos bugtracker so it can be found
> by people looking to do simple useful quests and develop illumos:
> https://www.illumos.org/issues/3596
Looking at that, isn't the real meat of this just making enable do a
clear if the service is in maintenance? After all, the manpage on my
S10 system says for enable "For each service instance, the assigned
restarter will try to bring it to the online state."
I know that I *wouldn't* want a forced enable to do a restart of
an already running service.
And force-enabling an offline service doesn't really make sense. It's
likely some other service that's causing the problem, the service
that's offline probably is enabled.
Related to this, my biggest gripe with SMF is that if you do a
restart and the stop method fails, it goes into maintenance
without even attempting to run the start method.
>> Hello all,
>>
>> While setting up systems there are occasions when an SMF service
>> needs to be restarted - i.e. due to reconfiguration or its failure.
>> The "svcadm restart" action only takes place for "online" services.
>>
>> I wonder if it is a reasonable RFE to add some command (and what
>> should it be called?) to try to "kick" a service into "online" state
>> from whatever starting situation. For an already "online" service
>> this would act as a "restart", for an "offline" service this would
>> be an "enable", and a service in "maintenance" this would "clear".
>>
>> This should likely do nothing with services in transitional state
>> (currently becoming online or offline - though maybe request restart
>> of the latter), and of course the action may fail again (likely into
>> maintenance) if the service is still misconfigured.
>>
>> It is just annoying to have to verify the service's current state
>> before "kicking" it, though I've spawned a simple admin-script on
>> my systems to do this chore ;)
>>
>> I think the solution should be a part of the common SMF structure.
>>
>> And it is a bite-size task for any enthusiast, now that we have
>> a few :)
>>
>> //Jim Klimov
>
>
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
--
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
More information about the OpenIndiana-discuss
mailing list