CoreGroupPolicyManagement (AdminTask)
We can use the Jython scripting language to configure and administer policies for high availability groups with wsadmin.sh. Use the commands and parameters in the CoreGroupPolicyManagement group to create, delete, and modify policies.
Use the following commands to define policies for high availability groups. Policies are defined at the core group level and apply only to matching high availability groups associated with the core group of interest.
- createAllActivePolicy
- createMOfNPolicy
- createNoOpPolicy
- createOneOfNPolicy
- createStaticPolicy
- deletePolicy
- modifyPolicy
createAllActivePolicy
The createAllActivePolicy command creates a high availability group policy that keeps each of the application components running on each server in the high availability group at all times.
Target object: None.
Required parameters
- -coreGroupName
- Name of the core group to associate with the new policy. (String, required)
- -policyName
- Name of the policy. (String, required)
Use the following guidelines to specify the policyName parameter:
- Specify valid characters, including numbers, letters, underscores, and spaces.
- Begin the policy name with a number or a letter.
- End the policy name with a number, letter, or underscore. The policy name cannot end with a space character.
- -matchCriteria
- Specifies one or more name and value pairs that the system uses to associate this policy with a high availability group. These pairs must match attributes contained in the name of a high availability group before this policy is associated with that group. (java.util.Properties, required)
Use the following guidelines to specify the matchCriteria parameter:
- Do not begin the match criteria with the underscore or period characters.
- Do not use the following characters: \/,#$@:;"*?<>|=+&%'
- Specify a value. This parameter cannot be null or empty.
Optional parameters
- -isAlive
- Specifies, in seconds, the interval of time at which the high availability manager checks the health of the active group members that are governed by this policy. If a group member has failed, the server on which the group member resides is restarted. The default value is 0. (Integer, optional)
- -description
- Specifies a description for the core group policy. (String, optional)
- -customProperties
- Specifies additional custom properties for the core group policy. (java.util.Properties, optional)
- -quorum
- Whether quorum checking is enabled for a group governed by this policy. Quorum is a mechanism that can be used to protect resources that are shared across members of the group in the event of a failure. Quorum is an advanced hardware function. Do not enable this function unless you properly understand how to use this function. If not used properly, this function can cause data corruption. The default value is false. (Boolean, optional)
Return value
The command does not return output.
Batch mode example usage
- Jython string...
AdminTask.createAllActivePolicy('-coreGroupName myCoreGroup -policyName myPolicy -matchCriteria "[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]" -quorum true -isAlive 100')
- Jython list:
AdminTask.createAllActivePolicy('-coreGroupName', 'myCoreGroup', '-policyName', 'myPolicy', '-matchCriteria', "[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]")
Interactive mode
- Jython:
AdminTask.createAllActivePolicy('-interactive')
createMOfNPolicy
The createMOfNPolicy command creates a high availability group policy that allows you to specify the number (M) of high availability group members to keep active if it is possible to do so. The number of active members must be greater than one and less than or equal to the number of servers in the high availability group.
Target object: None.
Required parameters
- -coreGroupName
- Name of the core group to associate with the new policy. (String, required)
- -policyName
- Name of the policy. (String, required)
Use the following guidelines to specify the policyName parameter:
- Specify valid characters, including numbers, letters, underscores, and spaces.
- Begin the policy name with a number or a letter.
- End the policy name with a number, letter, or underscore. The policy name cannot end with a space character.
- -matchCriteria
- Specifies one or more name and value pairs that the system uses to associate this policy with a high availability group. These pairs must match attributes contained in the name of a high availability group before this policy is associated with that group. (java.util.Properties, required)
Use the following guidelines to specify the matchCriteria parameter:
- Do not begin the match criteria with the underscore or period characters.
- Do not use the following characters: \/,#$@:;"*?<>|=+&%'
- Specify a value. This parameter cannot be null or empty.
Optional parameters
- -isAlive
- Specifies, in seconds, the interval of time at which the high availability manager checks the health of the active group members that are governed by this policy. If a group member has failed, the server on which the group member resides is restarted. The default value is 0.(Integer, optional)
- -quorum
- Whether quorum checking is enabled for a group governed by this policy. Quorum is a mechanism that can be used to protect resources that are shared across members of the group in the event of a failure. Quorum is an advanced hardware function. Do not enable this function unless you properly understand how to use this function. If not used properly, this function can cause data corruption. The default value is false.(Boolean, optional)
- -description
- Specifies a description for the core group policy. (String, optional)
- -customProperties
- Specifies additional custom properties for the core group policy. (java.util.Properties, optional)
- -failBack
- Whether work items assigned to the failing server are moved to the server that is designated as the most preferred server for the group if a failure occurs. This field only applies for M of N and One of N policies. The default value is false. (Boolean, optional)
- -preferredOnly
- Whether group members are only activated on servers that are on the list of preferred servers for this group. This field only applies for M of N and One of N policies. The default value is false. (Boolean, optional)
- -serversList
- Members to prefer when activating a group member. The members must be part of the core group for which the policy applies. Specify the value of the serverList parameter in the format of node/server. (String[], optional)
- -numActive
- Number of the high availability group members to activate. This field only applies for the M of N policy. The default value is 1. (Integer, optional)
Return value
The command does not return output.
Batch mode example usage
- Jython string...
AdminTask.createMOfNPolicy('-coreGroupName myCoreGroup -policyName myPolicy -matchCriteria "[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]" -quorum true -isAlive 100 -preferredOnly false -numActive2')
- Jython list:
AdminTask.createMOfNPolicy('-coreGroupName', 'myCoreGroup', '-policyName', 'myPolicy', '-matchCriteria', "[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]")
Interactive mode
- Jython:
AdminTask.createMOfNPolicy('-interactive')
createNoOpPolicy
The createNoOpPolicy command creates a high availability group policy that indicates that no high availability group members are made active.
Target object
None.
Required parameters
- -coreGroupName
- Name of the core group to associate with the new policy. (String, required)
- -policyName
- Name of the policy. (String, required)
Use the following guidelines to specify the policyName parameter:
- Specify valid characters, including numbers, letters, underscores, and spaces.
- Begin the policy name with a number or a letter.
- End the policy name with a number, letter, or underscore. The policy name cannot end with a space character.
- -matchCriteria
- Specifies one or more name and value pairs that the system uses to associate this policy with a high availability group. These pairs must match attributes contained in the name of a high availability group before this policy is associated with that group. (java.util.Properties, required)
Use the following guidelines to specify the matchCriteria parameter:
- Do not begin the match criteria with the underscore or period characters.
- Do not use the following characters: \/,#$@:;"*?<>|=+&%'
- Specify a value. This parameter cannot be null or empty.
Optional parameters
- -isAlive
- Specifies, in seconds, the interval of time at which the high availability manager checks the health of the active group members that are governed by this policy. If a group member has failed, the server on which the group member resides is restarted. The default value is 0.(Integer, optional)
- -description
- Specifies a description for the core group policy. (String, optional)
- -customProperties
- Specifies additional custom properties for the core group policy. (java.util.Properties, optional)
- -quorum
- Whether quorum checking is enabled for a group governed by this policy. Quorum is a mechanism that can be used to protect resources that are shared across members of the group in the event of a failure. Quorum is an advanced hardware function. Do not enable this function unless you properly understand how to use this function. If not used properly, this function can cause data corruption. The default value is false. (Boolean, optional)
Return value
The command does not return output.
Batch mode example usage
- Jython string...
AdminTask.createNoOpPolicy('-coreGroupName myCoreGroup -policyName myPolicy -matchCriteria "[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]"')
- Jython list:
AdminTask.createNoOpPolicy('-coreGroupName', 'myCoreGroup', '-policyName', 'myPolicy', '-matchCriteria', '"[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]"')
Interactive mode
- Jython:
AdminTask.createNoOpPolicy('-interactive')
createOneOfNPolicy
The createOneOfNPolicy command creates a high availability group policy that keeps one member of the high availability group active at all times. This is used by groups that want singleton failover. If a failure occurs, the high availability manager starts the singleton on another server.
Target object
None.
Required parameters
- -coreGroupName
- Name of the core group to associate with the new policy. (String, required)
- -policyName
- Name of the policy. (String, required)
Use the following guidelines to specify the policyName parameter:
- Specify valid characters, including numbers, letters, underscores, and spaces.
- Begin the policy name with a number or a letter.
- End the policy name with a number, letter, or underscore. The policy name cannot end with a space character.
- -matchCriteria
- Specifies one or more name and value pairs that the system uses to associate this policy with a high availability group. These pairs must match attributes contained in the name of a high availability group before this policy is associated with that group. (java.util.Properties, required)
Use the following guidelines to specify the matchCriteria parameter:
- Do not begin the match criteria with the underscore or period characters.
- Do not use the following characters: \/,#$@:;"*?<>|=+&%'
- Specify a value. This parameter cannot be null or empty.
Optional parameters
- -isAlive
- Specifies, in seconds, the interval of time at which the high availability manager checks the health of the active group members that are governed by this policy. If a group member has failed, the server on which the group member resides is restarted. The default value is 0. (Integer, optional)
- -quorum
- Whether quorum checking is enabled for a group governed by this policy. Quorum is a mechanism that can be used to protect resources that are shared across members of the group in the event of a failure. Quorum is an advanced hardware function. Do not enable this function unless you properly understand how to use this function. If not used properly, this function can cause data corruption. The default value is false. (Boolean, optional)
- -description
- Specifies a description for the core group policy. (String, optional)
- -customProperties
- Specifies additional custom properties for the core group policy. (java.util.Properties, optional)
- -failBack
- Whether work items assigned to the failing server are moved to the server that is designated as the most preferred server for the group if a failure occurs. This field only applies for M of N and One of N policies. The default value is false. (Boolean, optional)
- -preferredOnly
- Whether group members are only activated on servers that are on the list of preferred servers for this group. This field only applies for M of N and One of N policies. The default value is false. (Boolean, optional)
- -serversList
- Members to prefer when activating a group member. The members must be part of the core group for which the policy applies. Specify the value of the serverList parameter in the format of node/server. (String[], optional)
Return value
The command does not return output.
Batch mode example usage
- Jython string...
AdminTask.createOneOfNPolicy('[-coreGroupName DefaultCoreGroup -policyName MySIBusPolicy -matchCriteria "[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]" -isAlive 120 -serversList WASnode01/server1;WASnode02/server2]')
- Jython list:
AdminTask.createOneOfNPolicy(['-coreGroupName', 'DefaultCoreGroup', '-policyName', 'MySIBusPolicy', '-matchCriteria', '"[ [type WSAF_SIB][WSAF_SIB_BUS MyBus] ]"', '-isAlive', '120', '-serversList', 'WASnode01/server1;WASnode02/server2'])
Interactive mode
- Jython:
AdminTask.createOneOfNPolicy('-interactive')
createStaticPolicy
The createStaticPolicy command creates a high availability group policy that allows you to statically define or configure the active members of the high availability group.
Target object: None.
Required parameters
- -coreGroupName
- Name of the core group to associate with the new policy. (String, required)
- -policyName
- Name of the policy. (String, required)
Use the following guidelines to specify the policyName parameter:
- Specify valid characters, including numbers, letters, underscores, and spaces.
- Begin the policy name with a number or a letter.
- End the policy name with a number, letter, or underscore. The policy name cannot end with a space character.
- -matchCriteria
- Specifies one or more name and value pairs that the system uses to associate this policy with a high availability group. These pairs must match attributes contained in the name of a high availability group before this policy is associated with that group. (java.util.Properties, required)
Use the following guidelines to specify the matchCriteria parameter:
- Do not begin the match criteria with the underscore or period characters.
- Do not use the following characters: \/,#$@:;"*?<>|=+&%'
- Specify a value. This parameter cannot be null or empty.
- -serversList
- Members to prefer when activating a group member. The members must be part of the core group for which the policy applies. Specify the value of the serverList parameter in the format of node/server. (String[], optional)
Optional parameters
- -isAlive
- Specifies, in seconds, the interval of time at which the high availability manager checks the health of the active group members that are governed by this policy. If a group member has failed, the server on which the group member resides is restarted. The default value is 0. (Integer, optional)
- -description
- Specifies a description for the core group policy. (String, optional)
- -customProperties
- Specifies additional custom properties for the core group policy. (java.util.Properties, optional)
- -quorum
- Whether quorum checking is enabled for a group governed by this policy. Quorum is a mechanism that can be used to protect resources that are shared across members of the group in the event of a failure. Quorum is an advanced hardware function. Do not enable this function unless you properly understand how to use this function. If not used properly, this function can cause data corruption. The default value is false. (Boolean, optional)
Return value
The command does not return output.
Batch mode example usage
- Jython string...
AdminTask.createStaticPolicy('[-coreGroupName myCoreGroup -policyName myPolicy -matchCriteria "[[criteria1 value1][criteria2 value2]]" -serversList node/server1;node/server2;node/server3]')
- Jython list:
AdminTask.createStaticPolicy(['-coreGroupName', 'myCoreGroup', '-policyName', 'myPolicy', '-matchCriteria', '"[[criteria1 value1][criteria2 value2]]"', '-serversList', 'node/server1;node/server2;node/server3'])
Interactive mode
- Jython:
AdminTask.createStaticPolicy('-interactive')
deletePolicy
The deletePolicy command deletes a specific core group policy from the configuration.
Target object: None.
Required parameters
- -coreGroupName
- Name of the core group from which the system removes the policy. (String, required)
- -policyName
- Name of the policy to delete. (String, required)
Return value
The command does not return output.
Batch mode example usage
- Jython string...
AdminTask.deletePolicy('-coreGroupName myCoreGroup -policyName myPolicy')
- Jython list:
AdminTask.deletePolicy('-coreGroupName', 'myCoreGroup', '-policyName', 'myPolicy')
Interactive mode
- Jython:
AdminTask.deletePolicy('-interactive')
modifyPolicy
The modifyPolicy command modifies a specific core group policy of interest. You can use the modifyPolicy command to change one or many policy settings.
Target object: None.
Required parameters
- -coreGroupName
- Name of the core group that the policy of interest is associated with. (String, required)
- -policyName
- Name of the policy to modify. (String, required)
Use the following guidelines to specify the policyName parameter:
- Specify valid characters, including numbers, letters, underscores, and spaces.
- Begin the policy name with a number or a letter.
- End the policy name with a number, letter, or underscore. The policy name cannot end with a space character.
Optional parameters
- -newPolicyName
- New name for the policy of interest. (String, optional)
Use the following guidelines to specify the policyName parameter:
- Specify valid characters, including numbers, letters, underscores, and spaces.
- Begin the policy name with a number or a letter.
- End the policy name with a number, letter, or underscore. The policy name cannot end with a space character.
- -matchCriteria
- Specifies one or more name and value pairs that the system uses to associate this policy with a high availability group. These pairs must match attributes contained in the name of a high availability group before this policy is associated with that group. (java.util.Properties, optional)
Use the following guidelines to specify the matchCriteria parameter:
- Do not begin the match criteria with the underscore or period characters.
- Do not use the following characters: \/,#$@:;"*?<>|=+&%'
- Specify a value. This parameter cannot be null or empty.
- -isAlive
- Specifies, in seconds, the interval of time at which the high availability manager checks the health of the active group members that are governed by this policy. If a group member has failed, the server on which the group member resides is restarted. (Integer, optional)
- -quorum
- Whether quorum checking is enabled for a group governed by this policy. Quorum is a mechanism that can be used to protect resources that are shared across members of the group in the event of a failure. Quorum is an advanced hardware function. Do not enable this function unless you properly understand how to use this function. If not used properly, this function can cause data corruption. (Boolean, optional)
- -description
- Specifies a description for the core group policy. (String, optional)
- -customProperties
- Specifies additional custom properties for the core group policy. (java.util.Properties, optional)
- -numActive
- Number of the high availability group members to activate. This field only applies for the M of N policy. (Integer, optional)
- -preferredOnly
- Whether group members are only activated on servers that are on the list of preferred servers for this group. This field only applies for M of N and One of N policies. (Boolean, optional)
- -failBack
- Whether work items assigned to the failing server are moved to the server that is designated as the most preferred server for the group if a failure occurs. This field only applies for M of N and One of N policies. (Boolean, optional)
- -serversList
- Members to prefer when activating a group member. The members must be part of the core group for which the policy applies. Specify the value of the serverList parameter in the format of node/server. (String[], optional)
Return value
The command does not return output.
Batch mode example usage
- Jython string...
AdminTask.modifyPolicy('-coreGroupName myCoreGroup -policyName myPolicy -newPolicyName myPolicyRenamed')
- Jython list:
AdminTask.modifyPolicy('-coreGroupName', 'myCoreGroup', '-policyName', 'myPolicy', '-newPolicyName', 'myPolicyRenamed')
Interactive mode
- Jython:
AdminTask.modifyPolicy('-interactive')
Related tasks
Configure a core group policy for messaging engines Configure a Static policy for service integration Configure a One of N policy for service integration Configure a 'No operation' policy for service integration
Core group policies Core group policy settings