1837121 Members
11619 Online
110112 Solutions
New Discussion

MC/ServiceGuard

 
Tilok
Occasional Contributor

MC/ServiceGuard

Dear all,
Is there any option in Defining Package/Service for application dependency ?

Scenario is like this : i have 2 applications (ie. AP1 and AP2 ) and AP2 is dependend on AP1. Now in highavailable environment, i want these application to start/stop according to their dependency. ?,
Is there any option for this, while defining package ? or defining services withing package.

Thanks in advance.
tilok
5 REPLIES 5
Trond Haugen
Honored Contributor

Re: MC/ServiceGuard

Seems to me you would want both APPs in the same package. That way the scripts can controle the starting sequence and APP1 can be a required service for APP2.
You will also be able to controll the stopping sequence in the sto-script.

Regards;
Trond
Regards,
Trond Haugen
LinkedIn
Satish Y
Trusted Contributor

Re: MC/ServiceGuard

Hi Tilok,

I remember, but not sure that there will be a file called 'packages' in data directory of MC/SG. You can go through that.

Hope it helps.

Cheers...
Satish.
Difference between good and the best is only a little effort
John Palmer
Honored Contributor

Re: MC/ServiceGuard

This is the sort of thing that you should consider building into your package control scripts.

For instance, a common scenario in a two node cluster is to have PKG1 (database server) and PKG2 (Apps server). These normally run on seperate servers to make efficient use of the processing power available but can co-exist on the same server in the event of failure. This flexibility is one of the big advantages of Serviceguard.

In this example, PKG2 is dependent on PKG1 so its startup script should check that PKG1 is available and (probably) wait until it is.

PKG1 isn't dependent on PKG2 but its startup script could check to see if PKG2 needs to be restarted. This depends on how resilient PKG2 is to PKG1 failure.

The PKG2 shutdown script doesn't need to check anything but PKG1 shutdown may have to do something with PKG2.

Writing and testing resilient control scripts is one of the key steps to configuring a Serviceguard cluster. The tasks shouldn't be underestimated.

Regards,
John
melvyn burnard
Honored Contributor

Re: MC/ServiceGuard

One of the modules in the MC/ServiceGuard II Customer Education course covers the concepts you are looking for.
There is no real built-in easy way of configuring this, although it has been requested.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
George A Bodnar
Trusted Contributor

Re: MC/ServiceGuard

From the ascii file of a package:

# The keywords RESOURCE_NAME,
RESOURCE_POLLING_INTERVAL,
# RESOURCE_START, and RESOURCE_UP_VALUE are used to specify Package
# Resource Dependencies. To define a package Resource Dependency, a
# RESOURCE_NAME line with a fully qualified resource path name, and
# one or more RESOURCE_UP_VALUE lines are required. The
# RESOURCE_POLLING_INTERVAL and the RESOURCE_START are optional.

What you want to do is create a RESOURCE dependency between APP1 and APP2. When APP1 is started APP2 would start and when APP1 is shutdown APP2 would go down. The flexibility is that you could move these to different nodes whereas with 1 package you can not.