[OpenIndiana-discuss] Bug or feature in SMF? "svcadm restart" vs "disable+enable"
Jim Klimov
jimklimov at cos.ru
Mon Nov 18 14:27:42 UTC 2013
Hello all,
While testing my works on SMF inter-dependencies (such as with my
recent write-up on SMFization of local zones), I discovered that if
I run svcadm restart, then the dependency service (a zone) stops
first, and only when its state changes to "offline", the dependent
services (zones) begin to shut down. In the meanwhile, the dependency
service begins to start-up, allowing the dependents to restart later.
Apparently, this is not good: for example, if the dependency is a
database, and the dependent is a content-management server, the latter
will not be able to flush dirty data (if it must), close the database
connections and shut down cleanly - because the DBMS is no longer
available by the time the appserver begins to stop.
This happens both in illumos (oi_151a8) and in older OpenSolaris
SXCE (snv_117), and both with a direct restart of the dependency
service or with a restart of its dependency (such as a dedicated
zone-group or the common-root "zones" service, in my exemplar case).
Explicit sequence "svcadm disable -st zones; svcadm enable zones"
is processed correctly - the dependent zones stop first, then their
dependencies begin to stop, then the groupings and the common service
shuts down the remaining (not-SMFized) zones. Then things start up
in order, as well.
So the question is: did I miss some intimate values of "restart_on"
or even some less documented options in "dependency" definitions,
which would cause "restart" to be processed as "disable; enable", or
is this a feature in SMF (can someone explain the rationale)? Or a bug?
Thanks,
//Jim Klimov
More information about the OpenIndiana-discuss
mailing list