Create a policy for a high availability group
Overview
Before creating a new policy, you should understand the following requirements for matching a high availability group to a policy:
- A single high availability group cannot match to more than one policy. If the same match criteria is used for multiple policies, the high availability groups with names that match this criteria do not activate when the server is started and an error message, indicating that multiple policies match this group, is logged.
- The same policy can be used for multiple high availability groups.
- A hierarchy is used when matching a high availability group to a policy. If multiple properties are used for the match criteria, the policy that has the most matches with the high availability group name is the policy that is used.
You might want to perform this task if you have a high availability group that requires a policy that is different from the policy governing other high availability groups in the same core group. For example:
- A One of N policy is in effect for all of your high availability groups
- There is a high availability group within the core group that needs to have 5 members active at all times.
We can create a policy with M of N specified as the policy type and 5 specified for the Number of active members, and specify a match criterion that associates this policy with the high availability group that requires this policy.
Important:
- Do not change any of the default policies that are shipped with the WAS product. If we need to use different polices, create new policies and specify a match criterion that matches multiple attributes contained in the name of the high availability group. A policy with a greater number of match criterion matches overrides the IBM provided default policies. The IBM provided policies are still available for your use if you encounter a problem with the policies you create.
- Before changing the policy type for a high availability group, make sure you fully understand how the application server processes that are contained in that high availability group are configured and how they will be affected by the policy change. You must also verify that the component that uses that particular high availability group supports the new policy type. For example, if the high availability group for the service integration bus is using a one of N policy, because it only wants one server to be active at any given point in time, and you change the policy associated with that group to All Active, the service integration bus high availability support no longer functions properly and data corruption might occur.
To create a new policy:
Procedure
- In the administrative console, click...
Servers | Core groups | Core group settings | core_group_name | Policies | New- Select the new policy you want in effect for a specific high availability group. If we need to define a new policy, the policy options are:
All active policy Under this policy, all of the group members are activated. M of N policy Under this policy, M group members are activated. The number represented by M is defined as part of the policy details. No operation policy Under this policy, no group members are activated. One of N policy Under this policy, only one group member is activated. Static policy Under this policy, the active members of a group are statically assigned.
Multiple policies can be defined if different high availability groups require different policies. However, only one policy can be associated with a given high availability group.
- Click Next.
- Specify a name for the policy in the Name field. The name must be unique within the scope of the core group. The name should be meaningful to other administrators. For example, if you are setting up a new policy for the service integration bus, you might name the policy My Service Integration Bus Policy.
- Specify a value for the Is alive timer field if the default value is too long or too short a time period. This value determines how frequently the high availability manager checks the health of the high availability group members. The default value is 0 seconds.
- If you specify -1 the Is alive timer is disabled.
- If 0 (zero) is specified, the value specified for the Is alive timer at the core group services level is used for high availability groups associated with this policy.
- If an integer between 1 and 2147483647, inclusive, is specified, this value is used for high availability groups associated with this policy.
- Select Quorum if you want to enable quorum checking. When selected, quorum checking is enabled for a high availability group governed by this policy. Quorum is a mechanism that can be used to protect resources shared across members of the group in the event of a failure. CAUTION: Quorum is an advanced hardware function and should not be enabled unless you thoroughly understand how to properly use this function. If not used properly, this function can cause data corruption.
The Quorum setting in the policy will only have an effect if the following items are true:
- The group members are also cluster members.
- GroupName.WAS_CLUSTER=cluster_name must be specified as one of the name=value pairs contained in the dynamically generated name of a high availability group to which this policy applies. (A component that is using the high availability group function must include the name of its high availability group as part of its component code.)
When enabled, any group using this policy will not achieve quorum until a majority of the members are running. For example, if there are n members in the group, (n/2) + 1 servers must be online in order to achieve quorum. No group members will be activated until quorum has been achieved.
The quorum mechanism is designed to work in conjunction with a hardware control facility that allows application servers to be shut down if a failure causes the group to be partitioned.
- For M of N and One of N policies, select the Fail back option if, when the most preferred server is available, you want it to take back the workload from the servers that did the failover.
- For M of N and One of N policies, select the Preferred servers only option if you only want group members activated on servers included in the list of preferred servers for the group. If you select this option, set up a list of preferred servers after you click OK. A description of how to set up this list is provided in a later optional step.
- For an M of N policy, specify in the Number of active members field the number of group members that you want to be activated.
- Click Apply and then select Match criteria .
- On the next panel, click New and then specify one of the name and value pairs that you want to include in the match criterion for this policy. The name and value pair must match one of the name=value attributes contained in the name of a high availability group to which you want to associate this policy.
You, as the WebSphere Application Server administrator, do not have any direct control over the high availability group name. The implementer of the high availability group code decides which properties are used for the group name. We can only control the policy match criterion. To determine the name of a high availability group that is part of a core group, in the administrative console page, click Servers > Core groups > Core group settings and select the appropriate core group. Then click on Runtime Tab and look under the Group name properties field for the names of the high availability groups associated with that core group.
You should set the match criterion for a new policy to two or more of the name=value attributes contained in the high availability group's name to ensure that this policy is used instead of the default policy that IBM provides.
To Specify one of the name and value pairs that you want to include in the match criterion for this policy:
- In the Name field, enter the name of one of the name=value attributes contained in the name of the high availability group with which you want to associate this policy. For example, the service integration bus high availability group has the name
We can specify IBM_hc, WSAF_SIB_BUS, WSAF_SIB_MESSAGING_ENGINE, temp_property or type in the Name field.IBM_hc=AcceptanceCluster WSAF_SIB_BUS=SSS_Bus WSAF_SIB_MESSAGING_ENGINE=AcceptanceCluster.000-SSS_Bus temp_property=WSAF_TEMP type=WSAF_SIB- In the Value field, enter the value of the attribute you specified in the Name field. For example, if you specify IBM_hc in the Name field, specify AcceptanceCluster in the Value field for this match criterion to match an attribute included in the name of the service integration bus high availability group.
- Optional: Add a description of this match criterion in the Description field. For example, you might specify First attribute to indicate that this name=value pair matches the first attribute contained in the group name.
- Click OK.
- Repeat these steps for each additional attribute you want to include as part of your match criterion. For example, one can specify type for the Name field and WSAF_SIB for the Value field to include this name and value pair as part of your match criterion for this policy.
Using this example, the following high availability group-to-policy association is established:
High availability group High availability group name Policy name Policy match criterion service integration bus IBM_hc=AcceptanceCluster WSAF_SIB_BUS=SSS_Bus WSAF_SIB_MESSAGING_ENGINE=AcceptanceCluster.000-SSS_Bus temp_property=WSAF_TEMP type=WSAF_SIB My Service Integration Bus Policy IBM_hc=AcceptanceCluster,type=WSAF_SIB - For a Static policy, under Additional Properties, select Static group servers to select the servers that you want activated. Use Add to move core group servers into this list.
- Optional: Select preferred servers for the policy. If you selected the Preferred servers only option, you should set up a list of preferred servers. If you do not set up this list, no group members will be activated.
- Under Additional Properties, select Preferred servers.
- Use Add to move core group servers into the list of preferred servers. Use Move up and Move down to adjust the order of the servers within the list. Verify the most preferred server is at the top of the list and the least preferred server is at the bottom.
- Click Save, select Synchronize changes with Nodes and then click Save again to save your changes.
Result
The new policy goes into affect after it is saved and synchronized. You do not have to stop and restart the affected application servers. In the future, one can change this policy's settings for the Fail back and Preferred servers only options, and create or update the list of preferred servers associated with this policy without stopping and restarting the affected application servers.
See also
Core group policies
Core group policy settings
New core group policy definition
Preferred servers
Preferred coordinator servers
Matching criteria collection
Match criteria settings
Static group servers collection
See Also
High availability manager
Related Tasks
Changing the policy of a high availability group