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