Showing results for 
Search instead for 
Did you mean: 

how to set the Package policies in HP service guard

Occasional Contributor

how to set the Package policies in HP service guard



I have some queries about the package policies. We have a plan to configure a 2 node cluster with oracle database. Each node in the cluster will have 2 instance.


2 (A and B) instances will run on node-A and 2 instances (C and D) will run on node-B. If any of the node fails, those 2 instances should failover to the adoptive node. 


For this how the pkgA.env & pkgB.env on the primary node and pkgC.env & pkgD.env on the secondary node should configure ?... what are the parameters has to enable like package_type.


Your help is much appreciated....


Thanks in advance!

Honored Contributor

Re: how to set the Package policies in HP service guard

As a rule of thumb, "package_type" will always be "failover" unless you have specific instructions to set it otherwise (e.g. when installing a Veritas Cluster File System).


"failback_policy" has a default value of "manual" and that is usually good for Oracle databases.

Because the failover of an Oracle database can take a significant amount of time, if a node has failed and starts running again, you will probably want to carefully check it first to make sure it won't fail again, before starting the database instances again on that node.


A failback_policy of "automatic" would move the packages back to their primary node as soon as it becomes available: that might lead to a "ping-pong effect" where a package keeps doing failovers back & forth instead of remaining on the failover node and serving your users.


Since each package will have a preferred node where it is supposed to normally run, the "failover_policy" on each node should be "configured_node". The "node_name" lines should be specified in the appropriate order, i.e. for pkgA & pkgB:

node_name node-A
node_name node-B

 and for pkgC & pkgD:

node_name node-B
node_name node-A


If pkgA is independent of pkgB and pkgC is independent of pkgD, you won't need any other package policy definitions.


But if, for example, instance A assumes that instance B will always be running on the same node, then you should use package dependencies to make the cluster aware of this.

For example, the settings for pkgA:

dependency_name pkgBdep
dependency_condition pkgB = UP
dependency_location same_node

 (This would also mean that pkgB must always be started first before pkgA can be started.)


If you have a two-way dependency (i.e. pkgA depends on pkgB and pkgB depends on pkgA), then you might want to create a single package pkgAB, that would contain both instances.


By default, the "node_fail_fast_enabled" parameter will be set to "no". That is often a good default, particularly when you have more than one package per node. However, in some situations you might consider changing it, if the failover takes too long otherwise. But you should understand that "node_fail_fast_enabled yes" means that Serviceguard will intentionally crash a node when performing a failover.


A total failure of a single node is not the only possible failure scenario: for example, if a storage administrator makes a configuration error and makes pkgC's disks not accessible on node-B, a properly configured package would detect that the database instance in pkgC is failing, and could failover it to adoptive node to see if it can run better there.

  • if you have configured "node_fail_fast_enabled yes", then node-B will intentionally crash and both pkgC and pkgD will failover to node-A.
  • if "node_fail_fast_enabled" is unset but you have configured a same_node dependency between pkgC and pkgD, Serviceguard will automatically failover both pkgC and pkgD to node-A, but node-B will remain running.
  • if there are no dependencies and "node_fail_fast_enabled" is unset, then pkgC will failover to node-A but pkgD will remain running on node-B.
Occasional Contributor

Re: how to set the Package policies in HP service guard

Thanks a lot for your valuable reply...


Now in my case the senario is 4 packages (A,B,C,D) is running on Node-A and 4 packages (E,F,G,H) on node-B.


and we do have a package dependencies also, if package A fails on primary node then all the packages (B,C,D)has to halt in the node A and moves to node-B.


In this case in, let me know the below entries are correct in each package ascii configuration file ?


# pkgB's ascii configuration file:



# pkgC's ascii configuration file:



# pkgD's ascii configuration file:



Or is there any way to mention in any one of the paackage configuration file, like if package A fails, then all the packages B,C,D has to move to secondary node.


And also, if i have a If you have a four-way dependency like PkgA will dependent on PkgB and PkgB dependent on PkgC and PkgC dependent on PkgD. what would i do. Can i create a single package file called as ABCD ?


Or is there a way to have 4-way dependecy on a single node ? 


Then i have to enable this "node_fail_fast_enabled" as yes or No in case of package dependencies is there.


Many thnks in advance for your time and consideration.

sujit kumar singh
Honored Contributor

Re: how to set the Package policies in HP service guard

Hi simma,

what you can try is to have "same node" "package UP" dependency on package A for Packages B, C and D and similarly same node -UP dependency on Package E for packages E, F and H.

and put a "same node" package down dependency mutually for packages A and E - in case needed to have same configuration for that of A,B,C,D as that of E,F,G.H

Please note that the Same node package down dependency (like A and E) requires the down dependency to be mentioned mutually for each packages that is A and E, and these 2 package configuration files have to be applied using cmapplyconf -p A -p E simultaneously.

You can try this out.

See the White papers on SG package Weights, priority and dependency on HP DOCS.