[OpenIndiana-discuss] SMF "svcadm restart-or-clear-or-start" action

Jim Klimov jimklimov at cos.ru
Mon Feb 25 19:35:53 UTC 2013


On 2013-02-25 20:17, Peter Tribble wrote:
> 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."

Hm... possibly, at least if the docs say so and are not fulfilled ;)

> I know that I *wouldn't* want a forced enable to do a restart of
> an already running service.

No, in fact that's what I would like it to do - and hence overloading
the existing keywords is not an option in terms of backwards compat.

Say, I'm reconfiguring some server service, i.e. Apache or a Sendmail.
I changed the config, and I want to make sure that the service can
start with it. And I want to type as little as possible into the shell
too ;) So I'd go "svcadm kick sendmail" and not care if it ran or did
not, if it was failed or not. As a result, if the current config is
valid, the service should become online and having applied the new
config.

Thinking of it, the feature should also involve "svcadm refresh svcname"
so that changed SMF settings would also get applied in one blow.

> 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.

Okay, make it "enable -r" :-) But I am not sure it should be done by
default. If the feature includes diags after startup, as detailed in
the bugtracker, admin will be notified in his shell about the fact of
failure to start the service and about possible reasons - i.e. disabled
dependencies...

//Jim





More information about the OpenIndiana-discuss mailing list