9687 SMF service cannot be disabled
Review Request #497 — Created Aug. 1, 2018 and submitted — Latest diff uploaded
When a service or administrator requests that a service instance is disabled the GV_TOOFFLINE and GV_TODISABLE flags are set on it, and it is taken offline. When entering offline state GV_TOOFFLINE is cleared and if GV_TODISABLE is set, another request is sent to begin the transition into disabled state. Or at least this is what should happen. Currently the code checks GV_ENABLED instead, which sometimes means services are brought back online or fail to transition at all.
Most notably this is seen when a service is stuck in maintaince mode and doesn't transition to disabled until it is cleared.
Put service into stuck state by manipulating properties using svccfg. Prior to the fix, restarting svc.startd was not enough to force a transition into the correct state. After the fix, it was.