On Wed, Jun 14, 2006 at 09:56:09PM +0800, Darren Reed wrote:
> So what do I think is wrong here?
> 1) "svcadm disable ntp" has no affect on anything

  False.  It disabled the service.  We assume you want your services
  shut down cleanly, and part of that is waiting for a partially
  started service to finish starting cleanly.  The NTP start method has
  a timeout of 30 minutes; perhaps that should be shortened.

> 2) "svcs -x ntp" does not make sense.
>   "Start method is running" but it is "offline".
>   This should probably be "i'm disabling myself"

  True, it could print a better message, especially since the "Start
  method is running" and "offline" combination is printed in the both
  the starting-up and shutting-down case.  svcs -l isn't ambiguous in
  this case, though.

> 3) there is no output from "svcadm" telling me this

  That is because svcadm disable is completely asynchronous.  If you
  want synchronous behavior, you need to use the -s option.  It will
  wait until the effect of the requested operation is completed, or
  give you an error if something is going to prevent that from
  happening.

> In a conversation with someone last year, they put it
> to me that if you were putting this in a script, you
> would just issue the "disable" and no more problems.
> This is clear evidence that just doing "svcadm disable"
> is not nearly reliable enough of an action for that
> kind of treatment.

  If the commands executed after the disable depend on the service not
  running, then that's incorrect.  You need to use the -s option.

  Otherwise, disable is sufficient.  Subject to the definition of the
  service, the service will be stopped as soon as possible.

> My experience to date is that when everything is right
> and working fine, SMF is nice to deal with.  But when
> something isn't working right (especially network services)
> then it is far far worse than what were expected to do
> with prior Solaris.

  I think that's a little harsh, if not outright incorrect.  With
  previous versions of Solaris, you had now way to get this information
  at all.  When "something wasn't working right" and xntpd hung during
  start-up, you had no way to find out.  If it died, it died silently
  -- not to mention there was no way to query the system to see if
  xntpd was in fact supposed to be running.

> Personally, I don't care if the service is still doing
> its start method or something else.  If disable (and -t)
> are the only proper hooks to stop a service then that
> is what I expect it to do, not futz around and pretend.

  There is no pretending going on here.  The service will be stopped.
  SMF is simply doing what the service definition for NTP is telling it
  to do.  It can't make assumptions about why you are shutting down the
  service, or whether or you care how the service is shut down.

  Ultimately, svcadm is an administrative interface, not an interface
  for exacting vengeance on pids you don't want to see anymore.  If I'm
  disabling a Big Complicated Application, I want SMF to go through the
  paces, or else my app might not come up again.

  Perhaps we need a property that tells SMF that a service's start
  method is interruptible and should be short-circuited when the
  service is disabled while it's running.

  Dave


Reply via email to