Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

zone shutdown

39 views
Skip to first unread message

Frank Cusack

unread,
Nov 26, 2006, 9:39:58 PM11/26/06
to
Does 'zoneadm -z halt' do a clean shutdown (run svc stop methods)?
Does init 0 in the global zone do a clean shutdown in non-global zones.

-frank

Andrew Gabriel

unread,
Nov 27, 2006, 3:33:52 AM11/27/06
to
In article <m23b85l...@sucksless.local>,

Frank Cusack <fcu...@fcusack.com> writes:
> Does 'zoneadm -z halt' do a clean shutdown (run svc stop methods)?

No.
To do an init 0 in a zone from the global zone, run:
zlogin -S $zone /sbin/init 0

> Does init 0 in the global zone do a clean shutdown in non-global zones.

Yes, but if the zone doesn't shutdown within 60 seconds, it
halts it instead.

[This was in Solaris 10 3/05 -- I haven't checked if it changed since.]

--
Andrew Gabriel

Miroslav Zubcic

unread,
Nov 27, 2006, 3:34:49 AM11/27/06
to
Miroslav Zubcic wrote:

> Let's try ... Hm ... no it doesn't. :-) (tried with
> /lib/svc/method/smtp-sendmail, works if I do svcadm disable -t by hand)

Oracle is AFAIK supported in Solaris zones. This is interesting job oportunity
for an army of DBA's and backup opetators. :-)


--
Man is something that shall be overcome.
-- Friedrich Nietzsche

Miroslav Zubcic

unread,
Nov 27, 2006, 3:26:41 AM11/27/06
to
Frank Cusack wrote:

> Does 'zoneadm -z halt' do a clean shutdown (run svc stop methods)?
> Does init 0 in the global zone do a clean shutdown in non-global zones.

Interesting question. Zones are rebooted/halted VERY fast IMO. You can find out
this by writing hook in some /lib/svc/method/<script> stop routines like:

echo '$0 has been called' > /tmpfile

Let's try ... Hm ... no it doesn't. :-) (tried with
/lib/svc/method/smtp-sendmail, works if I do svcadm disable -t by hand)

Frank Cusack

unread,
Nov 27, 2006, 1:29:38 PM11/27/06
to
On 27 Nov 2006 08:33:52 GMT and...@cucumber.demon.co.uk (Andrew Gabriel) wrote:
> In article <m23b85l...@sucksless.local>,
> Frank Cusack <fcu...@fcusack.com> writes:
>> Does 'zoneadm -z halt' do a clean shutdown (run svc stop methods)?
>
> No.
> To do an init 0 in a zone from the global zone, run:
> zlogin -S $zone /sbin/init 0
>
>> Does init 0 in the global zone do a clean shutdown in non-global zones.
>
> Yes, but if the zone doesn't shutdown within 60 seconds, it
> halts it instead.

Do you know if this is user-settable somewhere? (Without modifying
anything that a patch would overwrite.)

-frank

Andrew Gabriel

unread,
Nov 27, 2006, 2:23:09 PM11/27/06
to
In article <m2y7pwz...@sucksless.local>,

Frank Cusack <fcu...@fcusack.com> writes:
> On 27 Nov 2006 08:33:52 GMT and...@cucumber.demon.co.uk (Andrew Gabriel) wrote:
>> In article <m23b85l...@sucksless.local>,
>> Frank Cusack <fcu...@fcusack.com> writes:
>>> Does 'zoneadm -z halt' do a clean shutdown (run svc stop methods)?
>>
>> No.
>> To do an init 0 in a zone from the global zone, run:
>> zlogin -S $zone /sbin/init 0
>>
>>> Does init 0 in the global zone do a clean shutdown in non-global zones.
>>
>> Yes, but if the zone doesn't shutdown within 60 seconds, it
>> halts it instead.
>
> Do you know if this is user-settable somewhere? (Without modifying
> anything that a patch would overwrite.)

No, it's in /lib/svc/method/svc-zones
It should really be picked up as an svc property. SMF wasn't
in Solaris at the time I wrote that part of what was the
init.d/zones script at the time, and whoever moved it under
SMF didn't do it either. You might even argue it should be a
per-zone property.

There's also a ceiling of 500 seconds in the system/zones.xml
manifest for the stop method.

--
Andrew Gabriel

Darren Dunham

unread,
Nov 27, 2006, 2:31:53 PM11/27/06
to
Frank Cusack <fcu...@fcusack.com> wrote:
>>> Does init 0 in the global zone do a clean shutdown in non-global zones.
>>
>> Yes, but if the zone doesn't shutdown within 60 seconds, it
>> halts it instead.

> Do you know if this is user-settable somewhere? (Without modifying
> anything that a patch would overwrite.)

Most SMF settings (if you make them directly svcprop) will be maintained
even if later patches apply.

60 seconds is the default timeout for a service, so that's probably
what's happening here. Just change the default timeout for the zones
service to be what you want.

--
Darren Dunham ddu...@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >

Andrew Gabriel

unread,
Nov 27, 2006, 4:12:37 PM11/27/06
to
In article <456b3b1d$0$627$5a6a...@news.aaisp.net.uk>,

and...@cucumber.demon.co.uk (Andrew Gabriel) writes:
> In article <m2y7pwz...@sucksless.local>,
> Frank Cusack <fcu...@fcusack.com> writes:
>> On 27 Nov 2006 08:33:52 GMT and...@cucumber.demon.co.uk (Andrew Gabriel) wrote:
>>> In article <m23b85l...@sucksless.local>,
>>> Frank Cusack <fcu...@fcusack.com> writes:
>>>> Does 'zoneadm -z halt' do a clean shutdown (run svc stop methods)?
>>>
>>> No.
>>> To do an init 0 in a zone from the global zone, run:
>>> zlogin -S $zone /sbin/init 0
>>>
>>>> Does init 0 in the global zone do a clean shutdown in non-global zones.
>>>
>>> Yes, but if the zone doesn't shutdown within 60 seconds, it
>>> halts it instead.
>>
>> Do you know if this is user-settable somewhere? (Without modifying
>> anything that a patch would overwrite.)
>
> No, it's in /lib/svc/method/svc-zones
> It should really be picked up as an svc property. SMF wasn't

Looking at the current Solaris source, Dan seems to have done this now.
I don't know if that's appeared in a Solaris 10 update though.

> in Solaris at the time I wrote that part of what was the
> init.d/zones script at the time, and whoever moved it under
> SMF didn't do it either. You might even argue it should be a
> per-zone property.
>
> There's also a ceiling of 500 seconds in the system/zones.xml
> manifest for the stop method.

...which has now been reduced to 100 seconds.

--
Andrew Gabriel

0 new messages