1827329 Members
5324 Online
109963 Solutions
New Discussion

packages dependecies

 
SOLVED
Go to solution
Mauro Gatti
Valued Contributor

packages dependecies

Hi all,
I have two packages pkgA and pkgB.
pkgB is dependent on pkgA:
-pkgB have to run only on node where pkgA is running
-pkgB have to run only if pkgA is running

I configured pkgB as shown below:
RESOURCE_NAME /cluster/package/package_status/pkgA
RESOURCE_POLLING_INTERVAL 60
RESOURCE_START AUTOMATIC
RESOURCE_UP_VALUE = UP

I would like that if pkgA switched from a node to another pkgB would follow it but it happens that pkgA switches but pkgB stops running.

Could you give me any hint about how to create dependencies between packages?

Thank You


RGDS
Ubi maior, minor cessat!
4 REPLIES 4
Solution

Re: packages dependecies

Mauro,

If you are on 11iv2 (11.23), then consider upgrading to the recently released Serviceguard 11.18 where simple package dependencies like this are supported:

http://docs.hp.com/en/B3936-90117/ch04s08.html#cihfgeaj

If you are still on 11iv1 (11.11) the I'm afraid you will have to script this.

Of course I have to ask the question - if pkgB can only run *where* pkgA is running and can only run *when* pkgA is running, why do you have 2 packages? Why not just combine everything into one package?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Stephen Doud
Honored Contributor

Re: packages dependecies

If you don't have the option to upgrade to A.11.18, then another method to manage package dependencies is to use package A's package control script to start package B on the same node after package A completes successful startup. Package B's control script can be editted to test whether Package A is already running on the same node before allowing package B to start.
You may also set up a package monitor for package B to test for the presence of package A on the same node, and if it is not - halt package B.
Mauro Gatti
Valued Contributor

Re: packages dependecies

Thank You Duncan,
I'm running 11.17 and I think I will upgrade to 11.18
Two packages are apache and tomcat.
Sometimes we allow tomcat to be down but we can't afford to have apache down also.

RGDS


Mauro

Ubi maior, minor cessat!
Mauro Gatti
Valued Contributor

Re: packages dependecies

-
Ubi maior, minor cessat!