Disabling or enabling a high availability manager

A unique HAManagerService configuration object exists for every core group member. The enable attribute in this configuration object determines if the high availability manager is enabled or disabled for the corresponding process. When the enable attribute is set to true, the high availability manager is enabled. When the enable attribute is set to false, the high availability manager is disabled. By default, the high availability manager is enabled. If the setting for the enable attribute is changed, the corresponding process must be restarted before the change goes into effect.

Before you begin

Each core group must contain at least one managed process that is enabled for the high availability manager. The managed process can be either a node agent or the deployment manager. Before disabling the high availability manager for a deployment manager, verify that the high availability manager is enabled for at least one node agent in the core group that contains the deployment manager.

About this task

You might want to disable a high availability manager if you are trying to reduce the amount of resources, such as CPU and memory, that WebSphere Application Server uses and have determined that the high availability manager is not required on some or all of the processes in a core group.

You might need to enable a high availability manager that you previously disabled because you are installing applications on core group members that must be highly available.

You must use the wsadmin tool to disable a high availability manager, or to enable a high availability manager that you previously disabled.

Procedure

Use the wsadmin tool to disable a high availability manager or to enable a high availability manager that you previously disabled.

Before you can use the wsadmin tool to disable a high availability manager or to enable a high availability manager that you previously disabled, you must add a script file that is similar to the following file to your system. This sample script file disables the high availability manager on a specific process. You can modify this script file if you need to disable the high availability manager on all of the processes in a cell or on all of the processes that are members of a specific core group. You can also modify this script file to enable a high availability manager that you previously disabled.

Avoid trouble: Disabling the high availability manager for the deployment manager is a special situation. The deployment manager holds the WebSphere master configuration repository, and the configuration change listener code for the high availability manager for the deployment manager runs in this process. Before you run a script to disable the high availability manager for the deployment manager, you must stop all members of the core group that includes the deployment manager. Then, after the script completes, you must restart the deployment manager before you restart any of the other processes in this core group. gotcha
##################################################################### 
# Script name = disableHamOnProcess.pty 
##################################################################### 

def getHAMServiceOnAll():     
    # get a list of all HAManagerService objects in the cell.     
    processes = AdminConfig.list("HAManagerService").split("\n")     
    rc = []     
    for p in processes:         
        p = p.strip()        
        rc.append(p)
    return rc

# The HAManagerService ObjectName has the following format
#cells/cellname/nodes/nodename/servers/servname:hamanagerservice.xml

def getNodeName(service):
    # The 4th /-separated element in the service name is the node name
    n = service.split("/")[3]
    return n

def getProcessName(service):
    # The 6th /-separated element in the service name is the process name
    p = service.split("/")[5]
    return p.split("|")[0]

def printHelp():
    print "This script disables the HA Manager on a specific process"
    print "Format is disableHamOnProcess nodeName processName"

##################################
# main
#################################
if(len(sys.argv) > 1):
    # get node name and process name from the command line
    nodeName = sys.argv[0]
    processName = sys.argv[1]
    # get a list of all HAManagerService objects in the cell.
    processes = getHAMServiceOnAll()
    for p in processes:
        # debug
        print "Checking process "+p
        # Check for a node name match.
        n = getNodeName(p)
        if (nodeName == n):
            # node name matches, check for server name match
            pn = getProcessName(p)
            if (pn == processName):
                # both node and process names match. Found the one we
                # are looking for. Disable and exit.
                print "Disabling the HA Manager on process ",
                print p
                AdminConfig.modify(p, [["enable", "false"]])
                AdminConfig.save()
                break
else:
    printHelp()
  1. Start the wsadmin tool.
  2. Start the deployment manager for the cell that contains the high availability manager that you are disabling or enabling. The deployment manager for this cell must be running for the sample script to work.
  3. Use the wsadmin tool to issue the following command to start the script:
    -lang jython -f script_file_name node_name process_name 

    For example, to start the sample script for the WASDOCLNodePH02 node and the ClusterMember2 process, issue the following command:

    -lang jython -f disableHamOnProcess.pty WASDOCLNodePH02 ClusterMember2 
  4. Synchronize this change across all of the affected nodes.
  5. Restart all of the processes for which the setting of the enable attribute in the HAManagerService configuration object is changed.

Results

The processes start with the high availability manager in the changed state.

What to do next

To verify that the high availability manager is in the proper state, check the log file for one of the following messages:

HMGR0005I: The Single Server DCS Core Stack transport has been started for core group DefaultCoreGroup.    

This message indicates that the high availability manager is disabled because the high availability manager communication transport can only establish communication with a single server process.

HMGR0001I: The DCS Core Stack transport has been started for core group DefaultCoreGroup. There are x members.

This message indicates that the high availability manager is enabled because the high availability manager communication transport can establish communication with multiple server processes. x indicates the number of server processes with which communication is established.




In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Sep 20, 2010 9:00:59 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=vela&product=was-nd-dist&topic=trun_ha_ham_enable
File name: trun_ha_ham_enable.html