| United States-English |
|
|
|
![]() |
Configuring OPS Clusters with ServiceGuard OPS Edition > Chapter 7 Cluster and Package MaintenanceManaging Packages and Services |
|
Managing packages and services involves the following tasks:
You can use ServiceGuard Manager, SAM or MC/ServiceGuard commands to perform these tasks. Ordinarily, a package configured as part of the cluster will start up on its primary node when the cluster starts up. You may need to start a package manually after it has been halted manually. You can do this either in SAM or with MC/ServiceGuard commands. Select the package you wish to start, and right-click to display the action list. You can start the package either on its default configured node, or on any node in the package node list. Select "Start Package on Configured Node" or "Start Package on Specified Node." In the latter case, you will see a select list of running eligible nodes from which you can choose the node on which the package should start. The progress window shows messages as the action takes place. This will includea messages for starting the package. The cluster must be running in order to start a package. In SAM, select "Package Administration," then choose the package you wish to start. From the "Actions" menu, choose "Start Package." If you wish to start the package on a specific node, choose "Start a Package on a Specific Node." Otherwise, choose "Start Package," and reply Yes to the verification prompt. Use the cmrunpkg command to run the package on a particular node, then use the cmmodpkg command to enable switching for the package. Example:
This starts up the package on ftsys9, then enables package switching. This sequence is necessary when a package has previously been halted on some node, since halting the package disables switching. You halt an MC/ServiceGuard package when you wish to bring the package out of use but wish the node to continue in operation. You can halt a package using SAM or using MC/ServiceGuard commands. Halting a package has a different effect than halting the node. When you halt the node, its packages may switch to adoptive nodes (assuming that switching is enabled for them); when you halt the package, it is disabled from switching to another node, and must be restarted manually on another node or on the same node. Select the package you wish to halt, and right-click to display the action list. Select "Halt the package." The package must be running. The progress window shows messages as the action takes place. This will include a message for halting the package. In the SAM "Package Administration" area, choose a package from the list, then select "Halt Package" from the Actions menu. Choose OK in response to the verification prompt. When you halt the package in this way, it is disabled from switching to another node. You can use SAM or MC/ServiceGuard commands to move a package from one node to another. Note that this operation only makes sense when a package is configured to run on more than one node. OPS instance packages are configured to run only one one node, and therefore they cannot be moved. Select the icon of the package you wish to halt, and right-click to display the action list. Select "Move package to node." The package must be running. You will see a list of possible destinations. Click on the node where you want the package to run. The progress window shows messages as the action takes place. This will include a message for halting the package and another for starting it on the destination node. From the Package Administration screen in SAM, choose a package, then select "Move a Package" from the Actions menu. Choose the node you wish to move the package to, then select OK. Reply Yes to the verification prompt. Before you move the package, halt it on its original node using the cmhaltpkg command. This action not only halts the package, but also disables switching the package back to the node on which it halts. After you have moved the package you must restart it and enable switching. You can do this in SAM or by issuing the cmrunpkg command followed by cmmodpkg -e package_name. cmmodpkg can be used with the -n option to enable a package to run on a node if the package has been disabled from running on that node due to some sort of error. If no node is specified, the node the command is run on is the implied node. Example:
There are two types of switching that apply to packages:
The initial setting for package switching is determined by the AUTO_RUN parameter, which is set in the package ASCII configuration file. If AUTO_RUN is set to YES, then Package Switching is enabled initially when the package first starts in the cluster. The initial setting for node switching is to allow switching to all nodes that are configured to run the package. Both node switching and package switching can be changed dynamically as the cluster is running. In OPS instance packages, normally the AUTO_RUN parameter is set to YES, which allows the package to start on its single configured node. The node switching parameter can be set to YES only for the instance's configured node. To change package switching in ServiceGuard Manager, select the package icon, then right-click to display the action menu. This display includes a check box labeled "Package Switching." To enable package switching, click on the box to put a check there. To disable package switching, click to remove the check from the box. To set or change the package's ability to start on a particular node, select "Node Switching" from the action menu. This displays a check box for each node that is eligible to run the package. Click on a node's check box to toggle its ability to run the package. Note that if the package is currently running on a node, and you disable switching of the package to that node, the package continues running, but it will not be able to switch back to the node at a later time. You can change package switching behavior either temporarily or permanently using MC/ServiceGuard commands. To temporarily disable switching to other nodes for a running package, use the cmmodpkg command. For example, if pkg1 is currently running, and you want to disable its ability to start up on another node, enter the following: # cmmodpkg -d pkg1 This does not halt the package, but it will prevent the package from starting up elsewhere. You can also disable package switching to particular nodes by using the -n option of the cmmodpkg command. The following disables the ability of pkg1 to switch to node lptest3: # cmmodpkg -d -n lptest3 pkg1 To permanently disable switching so that the next time the cluster restarts, the change you made in package switching is still in effect, you must change the AUTO_RUN flag in the package configuration file, then re-apply the configuration. (Any change made this way will take effect the next time the cluster is restarted.) See the subsequent section "Reconfiguring a Package on a Running Cluster" for detailed instructions on reconfiguration. |
|||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||