Operating System - HP-UX
1833757 Members
2752 Online
110063 Solutions
New Discussion

Conditional Package FailOver . . . .

 
SOLVED
Go to solution
Muhammad Ahmad
Frequent Advisor

Conditional Package FailOver . . . .

Hi,

Is it possible to control the package failover to standby node depending on certain conditions?

Cluster Environment Details:
----------------------------

HPUX 11.31 - 3 Nodes Cluster
SG A.11.18

we have 3 nodes and 2 packages.
1 package is running on NodeA
1 package is running on NodeB
NodeC is the standby Node for both the Packages of NodeA & NodeB.

Our Requirement
---------------

In Case if NodeA got down; package will failover to NodeC and if meanwhile NodeB also crashed it's package Should Not failover to NodeC.

i.e. if both the Nodes (A & B) got crashed simultanously or one after another only One package could run on standby node (C). (by default both the packages failover to standby node (NodeC) ).

if this is possible, what configurations changes we neeed to do ?

Regards,
4 REPLIES 4
S.N.S
Valued Contributor

Re: Conditional Package FailOver . . . .

Salaam Muhammad,

Have a look at the Package Configuration file Parameters (attached)

Concentrate on:

FAILOVER_POLICY ; FAILBACK_POLICY; NODE_NAME;

Read thru the rest to ensure your applicability
Set each package accordingly

HTH
SNS

Points if helpful..Merci
"Genius is 1% inspiration, 99% Perspiration" - Edison
Matti_Kurkela
Honored Contributor
Solution

Re: Conditional Package FailOver . . . .

S.N.S's attachment is good for older versions of Serviceguard, but it does not cover the newer modular package configuration syntax of Serviceguard A.11.18 and newer.

Let's assume the package that normally runs on NodeA is PackageA, and the package that's normally on NodeB is PackageB.

To solve your problem, you would need an exclusion dependency, i.e. PackageB would have to be configured to require that PackageA is *not* running on the same node, and vice versa.

You could also adjust the priorities of the packages, to ensure that the more important package will run if you have only one node available. (In my example below, I'll assume that PackageA is the more important one.)

Unfortunately, exclusion dependencies seem to be a new feature of Serviceguard A.11.19: your current version allows only inclusion dependencies (i.e. "for this package to run, some other package must already be running").

If you updated to Serviceguard A.11.19, the necessary configuration would be:

PackageA configuration:

priority 10
dependency_name PackageAdep
dependency_condition PackageB = DOWN
dependency_location same_node

PackageB configuration:

priority 20
dependency_name PackageBdep
dependency_condition PackageA = DOWN
dependency_location same_node

NOTE: when using exclusion dependencies, both package configurations in the exclusion pair must be applied together with a single cmapplyconf command, i.e.

cmapplyconf -P packageA.conf -P packageB.conf

This configuration would prevent PackageA and PackageB from ever running on the same node (no matter which node it is), and the priorities would cause PackageB to always stop and PackageA to run if there's only one node available.

If you cannot upgrade to Serviceguard A.11.19, you can probably achieve about the same effect by writing a small script that checks if PackageB is running on the same node, and if it is, disables it (cmmodpkg -d PackageB; cmhaltpkg PackageB). This script should then be run at the earliest possible point in PackageA start-up: if you use legacy package format, this should be placed in the beginning of "customer_defined_run_commands", in modular package configuration format this could be an "external_pre_script".

MK
MK
Muhammad Ahmad
Frequent Advisor

Re: Conditional Package FailOver . . . .

Thanks for the early responses.

Hi MK,

Can you please explain in detail the procedure in 11.18 version?

one more important point needs to be discussed, we need to add another node in the existing 3-nodes cluster.

existing 3-nodes are running on 11.31 FOE where-as the new added which needs to be added in this cluster is running 11.31 DCOE.

should we proceed towards cluster extension with this configuration or should we uninstall the DCOE and install FOE on the new node which needs to be add in the cluster before proceeding for node addition in 3-Nodes cluster ?

Kind Regards,
Muhammad Ahmad
Frequent Advisor

Re: Conditional Package FailOver . . . .

In Addition to my above message, currently NodeA package can failover to NodeB.

Now, we need that after addition of NodeD (4rth Node) in the cluster. NodeA package can also failover to NodeD, currently NodeA package Alternate Node is NodeB only.

In our understanding, we Only need to specify the NodeD details in NodeA's package .conf file, then commodpkg and cmapplypkg. That's it.

Kindly comment on this discussion too.

Regards,