[OpenIndiana-discuss] SMF "svcadm restart-or-clear-or-start" action
Sašo Kiselkov
skiselkov.ml at gmail.com
Mon Feb 11 23:23:41 UTC 2013
On 02/12/2013 12:12 AM, Jim Klimov wrote:
> 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
>
> PS: no bugtracker RFE yet posted
Just as a curious question, would a "kick" be functionally equivalent to
running the following 3 commands:
# svcadm clear <fmri>
# svcadm restart <fmri>
# svcadm enable <fmri>
I have nothing against implementing a "svcadm kick <fmri>", I just want
to check that I understand correctly what you mean. Indeed, at times I'd
use it myself, though I'm not sure whether it's good as part of the
upstream command set. I lack the data to call my experience
representative of most admin's styles.
Cheers,
--
Saso
More information about the OpenIndiana-discuss
mailing list