[zones-discuss] Re: Zone start order

2007-03-07 Thread Peter van Gemert
Hi Paul,

The only way I can think of create your own services in the global zone that 
will do a zoneadm -z zonename boot and have these service depend on each other. 
You then have to disable the svc:/system/zones service which is used to boot 
all zones during system boot.

Greetings,
Peter
 
 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Zone start order

2007-03-07 Thread Enda O'Connor ( Sun Micro Systems Ireland)

Paul Davis wrote:


Is there a way to control the (auto) start order of zones or better yet 
even dependencies? We have a complete, tiered environment in zones and 
would like to control the start order:


   DB zone - APP zone - WEB zone

Thanks,
Paul



___
zones-discuss mailing list
zones-discuss@opensolaris.org

Hi
I guess one question is what would happen if these were on seperate 
systems ( ie different global zones as such ).


ie if these were on different systems thne the sart order is going to be 
hard to control anyway. If the various systems are all well integrated, 
the order shoudl not make much of a difference?


But I guess one could write a svc service to boot the various zones in a 
set order, one would then set autoboot to false, as the boot is then 
controlled by a seperate script.
I have attached a sample svc script, one nes to write the exec METHOD 
script though.


svccfg import zones.xml
svcadm enable site/startzones

/lib/svc/method/svc-zones is a good example of how to write the 
start/stop METHODS exec script's, ie one scritp that handles start/stop etc.


Make sure to disable autoboot inthe zonecfg  and also svc:/system/zones

Enda

?xml version=1.0?
!DOCTYPE service_bundle SYSTEM /usr/share/lib/xml/dtd/service_bundle.dtd.1
service_bundle type='manifest' name='zonesscript'
service
name='site/startzones'
type='service'
version='1'
single_instance /

dependency
name='local-fs'
type='service'
grouping='require_all'
restart_on='none'
service_fmri value='svc:/system/filesystem/local' /
/dependency

exec_method
type='method'
name='start'
exec='SOME SCRIPT THAT STARTS THE ZONES'
timeout_seconds='10'
method_context
method_credential user='root' /
/method_context
/exec_method

exec_method
type='method'
name='stop'
exec='SOME SCRIPT THAT STARTS THE ZONES'
timeout_seconds='10'
method_context
method_credential user='root' /
/method_context
/exec_method
instance name='default' enabled='false' /
/service
/service_bundle

___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] Zone in mounted state

2007-03-07 Thread shivani khosa

Hi Sivakumar,
First unmount the zone and then boot it since booting a mounted zone 
isn't permitted.So, you need to do the following:


zoneadm -z zonename unmount
zoneadm -z zonename boot

Regards
Shivani
Sivakumar Shanmugasundaram wrote:
I have a non-global zone which shows in a 'mounted' state. (Guess, I 
hit on the CR#6217053

Now, I cant boot or halt it.

Any help/workaround is much appreciated.

Siva
___
zones-discuss mailing list
zones-discuss@opensolaris.org


___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Zone in mounted state

2007-03-07 Thread Enda O'Connor ( Sun Micro Systems Ireland)

Sivakumar Shanmugasundaram wrote:
I have a non-global zone which shows in a 'mounted' state. (Guess, I hit 
on the CR#6217053

Now, I cant boot or halt it.

Any help/workaround is much appreciated.

Siva
___
zones-discuss mailing list
zones-discuss@opensolaris.org


were you adding patches to the system at the time?

run zoneadm -z zonename unmount

then boot the zone and see if the zone boots, check that any 
patches/packages have applied properly, assuming that is what caused the 
issue



Enda
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Zone in mounted state

2007-03-07 Thread Sivakumar Shanmugasundaram

Shivani/Enda,

Thanks.

This worked. 'unmount' is undocumented, is it?

Enda, yes. I was doing a pkgadd when I interrupted it. (to run pkgadd -G 
again).


Siva


shivani khosa wrote:

Hi Sivakumar,
First unmount the zone and then boot it since booting a mounted zone 
isn't permitted.So, you need to do the following:


zoneadm -z zonename unmount
zoneadm -z zonename boot

Regards
Shivani
Sivakumar Shanmugasundaram wrote:
I have a non-global zone which shows in a 'mounted' state. (Guess, I 
hit on the CR#6217053

Now, I cant boot or halt it.

Any help/workaround is much appreciated.

Siva
___
zones-discuss mailing list
zones-discuss@opensolaris.org



___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Zone in mounted state

2007-03-07 Thread Enda O'Connor ( Sun Micro Systems Ireland)

Sivakumar Shanmugasundaram wrote:

Shivani/Enda,

Thanks.

This worked. 'unmount' is undocumented, is it?
It's an internal zone state used by the patch/packaging tools to manage 
zones that are halted.


Enda, yes. I was doing a pkgadd when I interrupted it. (to run pkgadd -G 
again).

hmm, did the interrupt cause the software to be partially installed?
if so a pkgrm is in order beforehand perhaps.

Enda


Siva


shivani khosa wrote:


Hi Sivakumar,
First unmount the zone and then boot it since booting a mounted zone 
isn't permitted.So, you need to do the following:


zoneadm -z zonename unmount
zoneadm -z zonename boot

Regards
Shivani
Sivakumar Shanmugasundaram wrote:

I have a non-global zone which shows in a 'mounted' state. (Guess, I 
hit on the CR#6217053

Now, I cant boot or halt it.

Any help/workaround is much appreciated.

Siva
___
zones-discuss mailing list
zones-discuss@opensolaris.org





___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Zone in mounted state

2007-03-07 Thread James Carlson
Sivakumar Shanmugasundaram writes:
 This worked. 'unmount' is undocumented, is it?

Not documented, because it's not supported for customer use.  It's not
a secret, though.  You can find out what it does in PSARC 2005/474.

 Enda, yes. I was doing a pkgadd when I interrupted it. (to run pkgadd -G 
 again).

The tools are supposed to unmount the zone even when stopped by
interruption.  If that's not happening, then either there's a bug (and
we'd like to know about it -- file one) or you used extreme force to
interrupt the process (such as SIGKILL).

If it's the latter, I wouldn't trust the system too much after having
interrupted a packaging change.

-- 
James Carlson, Solaris Networking  [EMAIL PROTECTED]
Sun Microsystems / 1 Network Drive 71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Re: Zone start order

2007-03-07 Thread Rodney Lindner

Hi Renaud,
I like that as it does not break any thing else, but may catch some 
people out in the future when zones autoboot that they were not 
expecting based on the zone XML. And best of all it works now.
I was thinking of a RFE on how to add this feature. I came up with two 
ideas and I would like to socialize them, to see what people think.


RFE: To be able to specify the boot order of a zone.
Method 1: (SMF mod only)
Modify the smf svc:/system/zones service to look for a file (say 
/etc/zonesbootorder). If it is present it will boot the zones in the 
order the appear in the file and the move on to boot any remaining zones 
in any order.


Method2: (Enhance zones XML properties and rewrite SMF zones service)
Add an additional(optional) property to zones XML which contains a 
numerical value for startorder (0-64K). The SMF service then starts the 
zone by lowest startorder value first (1-64k). Two zones have the same 
value means we don't care which one starts first. I would suggest we 
also define 0 as don't care


Comments welcome.

The precedence of starting application in a multi tier environment has 
always been a big issue and is normally solved by manual operator 
intervention. This feature would alleviate that and be a compelling 
reason to move to zones.


Regards
Rodney Lindner

Renaud Manus wrote:
I would not disable svc:/system/zones service because it can still be 
used to start and stop zones that do not depend on other zones. On

the contrary, I would make the newly created services also dependent
on svc:/system/zones and make sure the zones that need to start in a
specific order have autoboot set to false.

-- Renaud

 Original Message  
Subject: [zones-discuss] Re: Zone start order
From: Peter van Gemert [EMAIL PROTECTED]
To: zones-discuss@opensolaris.org
Date: Wed Mar 07 2007 11:41:13 GMT+0100 (CET)


Hi Paul,

The only way I can think of create your own services in the global 
zone that will do a zoneadm -z zonename boot and have these service 
depend on each other. You then have to disable the svc:/system/zones 
service which is used to boot all zones during system boot.


Greetings,
Peter
 
 
This message posted from opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


___
zones-discuss mailing list
zones-discuss@opensolaris.org


___
zones-discuss mailing list
zones-discuss@opensolaris.org


[zones-discuss] packages and inherit-pkg-dir

2007-03-07 Thread Christine Tran


If I have an application (SUNW_PKG_ALLZONES = FALSE) that installs some 
in /opt and some in /var/opt, and I set my non-global zone to have an 
inherit-pkg-dir /opt, when I install the zone and when I patch the 
application in the global zone, will it install and patch my NGZ 
/var/opt, where portions of my package lives?


I have a customer ask me whether it's enough give a NGZ zone an 
inherit-pkg-dir where part of the package lives, and the install and 
patching tools will know to patch the NGZ as well.


In short, the customer wants a reliable way to make sure an app is 
delivered in multiple zones with minimal human administration of patches.


CT
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Re: Zone start order

2007-03-07 Thread Paul Davis


Rodney and all:

Thanks all for all the input.

Rodney, you have some great ideas for an RFE.

Edna, you are correct that the same issue exists on tiered, physical 
servers, but as Rodney points out, this is typically solved by manual 
operator intervention. My question was if anything existed within the 
zones framework that I could use and leave autoboot=true. The answer 
is no.


For my real-world situation, I had to come up with a solution in about 
1/2 of a day, so we used /etc/rc scripts with sleep intervals to fit the 
environment and with zone autoboot=false.


Note that the shutdown needed to be ordered as well and I had to use an 
appropriate sleep interval to allow all the zones to go to installed 
state before the svc:/system/zones:default service tried to shut them 
down as well. Yes, an svc service with dependencies would have been more 
elegant...


I think an RFE is in order and should have critical priority to be 
implemented sometime after we achieve world peace :-)


Paul


Rodney Lindner wrote:

Hi Renaud,
I like that as it does not break any thing else, but may catch some 
people out in the future when zones autoboot that they were not 
expecting based on the zone XML. And best of all it works now.
I was thinking of a RFE on how to add this feature. I came up with two 
ideas and I would like to socialize them, to see what people think.


RFE: To be able to specify the boot order of a zone.
Method 1: (SMF mod only)
Modify the smf svc:/system/zones service to look for a file (say 
/etc/zonesbootorder). If it is present it will boot the zones in the 
order the appear in the file and the move on to boot any remaining 
zones in any order.


Method2: (Enhance zones XML properties and rewrite SMF zones service)
Add an additional(optional) property to zones XML which contains a 
numerical value for startorder (0-64K). The SMF service then starts 
the zone by lowest startorder value first (1-64k). Two zones have the 
same value means we don't care which one starts first. I would suggest 
we also define 0 as don't care


Comments welcome.

The precedence of starting application in a multi tier environment has 
always been a big issue and is normally solved by manual operator 
intervention. This feature would alleviate that and be a compelling 
reason to move to zones.


Regards
Rodney Lindner

Renaud Manus wrote:
I would not disable svc:/system/zones service because it can still be 
used to start and stop zones that do not depend on other zones. On

the contrary, I would make the newly created services also dependent
on svc:/system/zones and make sure the zones that need to start in a
specific order have autoboot set to false.

-- Renaud

 Original Message  
Subject: [zones-discuss] Re: Zone start order
From: Peter van Gemert [EMAIL PROTECTED]
To: zones-discuss@opensolaris.org
Date: Wed Mar 07 2007 11:41:13 GMT+0100 (CET)


Hi Paul,

The only way I can think of create your own services in the global 
zone that will do a zoneadm -z zonename boot and have these service 
depend on each other. You then have to disable the svc:/system/zones 
service which is used to boot all zones during system boot.


Greetings,
Peter
 
 
This message posted from opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


___
zones-discuss mailing list
zones-discuss@opensolaris.org


___
zones-discuss mailing list
zones-discuss@opensolaris.org

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] Re: Zone start order

2007-03-07 Thread Rich Teer
On Thu, 8 Mar 2007, Rodney Lindner wrote:

 RFE: To be able to specify the boot order of a zone.
 Method 1: (SMF mod only)
 Modify the smf svc:/system/zones service to look for a file (say
 /etc/zonesbootorder). If it is present it will boot the zones in the order the
 appear in the file and the move on to boot any remaining zones in any order.
 
 Method2: (Enhance zones XML properties and rewrite SMF zones service)
 Add an additional(optional) property to zones XML which contains a numerical
 value for startorder (0-64K). The SMF service then starts the zone by lowest
 startorder value first (1-64k). Two zones have the same value means we don't
 care which one starts first. I would suggest we also define 0 as don't care

I think this is a great idea!  Method 2 strikes me as being the cleanest,
most elegant solution.

-- 
Rich Teer, SCSA, SCNA, SCSECA, OpenSolaris CAB member

CEO,
My Online Home Inventory

Voice: +1 (250) 979-1638
URLs: http://www.rite-group.com/rich
  http://www.myonlinehomeinventory.com
___
zones-discuss mailing list
zones-discuss@opensolaris.org