Operating System - HP-UX
1833790 Members
2826 Online
110063 Solutions
New Discussion

Re: MC Service Guard Package Dependencies

 
Boonchu Ngampairoijpibu_1
Occasional Contributor

MC Service Guard Package Dependencies

Hi everyone-

I would like to discuss with your guys regarding package dependencies in Service Guard. For example, I start a new cluster with package A, B and C. Package B will be functionally dependent on package A. Also package C will functionally dependent on package B. Make a more simple life, I would like to start package A first. The cluster cannot start package B until package A is completely done.

I just think about to put everything together in the same package. But, you know, what if you have to locate your packages on different nodes? For example, I plan to create a oracle package and third-party application package running in node A and B respectively in the same cluster. For this point, I have to definitely start package A with Oracle before I start package B with third-party package. If package B start first, application would not work correctly.

Well, any idea?

PS. I do not like the way to call sleep(). But well:) I might use them, if I cannot find the good solution, anyway.
Boonchu Ngampairoijpibul
3 REPLIES 3
Carsten Krege
Honored Contributor

Re: MC Service Guard Package Dependencies

The best way to implement this is to create lock files like /etc/cmcluster/packageA_is_starting and to check in the dependent package scripts for their existence. This is perhaps the easiest way to implement it.

One could also define package services that check periodically for files like /etc/cmcluster/packageA_down.

Another way to do this is to use EMS HA Monitors and to configure a deferred resource (starting with SG 11.08, see also SG 11.08 RelNotes on http://docs.fc.hp.com/hpux/pdf/B3935-90021.pdf) /cluster/package/package_status/packageA as a package dependency. This resource would be monitored for UP status once packageB/C started. However, due to timing issues, I recommend against this.

The first method to create lock files is much more reliable and can be easily built in the package control script.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
MARTINACHE
Respected Contributor

Re: MC Service Guard Package Dependencies

Hi,

I'm not sure that testing a package is best way.

What you really need ? a running database or running package ?

Here is a part of my cluster :

Package pkgnfs (export data via NFS)
Package pkgdb (oracle database)
Package pkgapp (oracle application)

pkgapp needs that the database is up and running and data which are exported from NFS.

In the start script of pkgapp, I test that :

- I can use data exported via NFS or locally if pkgnfs is on the same server
- I can connect to the database (su - oracle ; sqlplus ....@database).

If something is unvailaible, I wait 30s and I test again during 10 minutes.

A running package doesn't mean that everything is OK. A real test is the best way.

Regards,

Patrice.
Patrice MARTINACHE
Boonchu Ngampairoijpibu_1
Occasional Contributor

Re: MC Service Guard Package Dependencies

Thanks for all responses-

I think about checking processes runing or not are very good idea to implement.

I think I will implement small script like checking all processes of oracle database. If it's up and running, I will add in script to check with lsnrctl command to check SQL*Net status also. If it does not completely activate, its script will wait until it done.
Boonchu Ngampairoijpibul