[OpenIndiana-discuss] Local zones as SMF service instances

jimklimov at cos.ru jimklimov at cos.ru
Tue Nov 19 15:51:52 UTC 2013


By the way, the currently proposed solution relies on inspection of log files and string matching, which is not very portable or future-proof. I think about setting some SMF instance attribute to mark start and successful finish of the service shutdown method (also cleared on startup method). If this stop method starts and the flag is up, then the previous invokation apparently failed, and logic can be different (zoneadm halt).

I am surprised to have found no relevant attributes maintained and exposed by smf itself (not with svcprop at least). Are there currently ways within smf to verify that the current method is an Nth>1 retry?

Do my proposed crutches (above) rather belong in smf as an improvement, or are they already redundant because i missed something? 

Thanks, Jim 

Typos courtesy of my Samsung Mobile

-------- Исходное сообщение --------
От: Jim Klimov <jim at cos.ru> 
Дата: 2013.11.19  1:46  (GMT+01:00) 
Кому: openindiana-discuss at openindiana.org 
Тема: Re: [OpenIndiana-discuss] Local zones as SMF service instances 
 
On 2013-11-18 04:45, Jim Klimov wrote:
> Hello all,
>
>    If you were ever annoyed by having all zones starting and stopping
> as a wild herd on a stampede, while you want them to be orchestrated
> in a particular order? Then check this out:
>    http://wiki.openindiana.org/oi/Zones+as+SMF+services
>
>    This also works on OpenSolaris SXCE, and I haven't yet verified,
> but see no reason for it to fail on Solaris 10 or 11...

NOTE to the interested (if you're already trying this out): I updated
the zone.xml manifest today with expanded logic which should detect
if the previous attempt to stop this instance timed out and failed,
and in this case the method does "zoneadm halt" instead of graceful
"zlogin ... init 5".

It is possible that a zone would not shut down due to "init 5" for
some reason, and its "online" dependent service would block the "zones"
service from stopping upon system shutdown, for example.

While timeouts are by default disabled in this service, it makes some
sense to enable them (even if set to large values like 1800 seconds)
for the service or for some instances on particular installations.

Good luck,
//Jim


_______________________________________________
OpenIndiana-discuss mailing list
OpenIndiana-discuss at openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss


More information about the OpenIndiana-discuss mailing list