I think such things have been discussed on the mailing list before, but rather than put dependencies between zones explicitly in the global zone (which wouldn't scale if you need to deploy in a public cloud or across multiple hypervisors) you may want to create a service in the application zone that checks to see if Pg is running yet and basically waits until it is, and then have your application depend on that service.

Alternately the start script that runs your application could do that checking before finally launching the application.

-Nahum

On 08/26/2015 08:46 AM, Fiona Amber wrote:
Hello All.

I'm using different zones to run PostgreSQL server and some
Java-applications (Teamcity for example), which are using Pg
as pre-requisites for the start process and during their
work process. And now I want to control these applications
(especially their starting on zone boot) with SMF and svcadm.
In this case I need to be sure that Pg zone is booted and Pg
itself started before custom app starting.

For now I can see only one way to implement this:
I should add SMF-service in global zone,
which will list pkgsrc/postgresql from particalar zone in dependency tag.
As it can be seen from man, I can locate zone's service from global zone like
"svcs -az <zone-uid> pkgsrc/postgresql" and obtains its status and so on.

Is it possible to point in SMF-manifest to precisely
this service with zone-uid (something like svc:/zone-uid/pkgsrc/postgresql) ?
Moreover, it is more preferably to be able implement
this in non-global zone service manifest.

So, are there any ways to add dependency in SMF-service manifest
for service from another zone (preferably non-global)?
*smartos-discuss* | Archives <https://www.listbox.com/member/archive/184463/=now> <https://www.listbox.com/member/archive/rss/184463/22280019-340ab187> | Modify <https://www.listbox.com/member/?&;> Your Subscription [Powered by Listbox] <http://www.listbox.com>





-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to