| United States-English |
|
|
|
![]() |
Managing Serviceguard Version A.11.16, Eleventh EditionSecond Printing > Chapter 7 Cluster
and Package MaintenanceManaging Packages and Services |
|
Managing packages and services involves the following tasks:
In Serviceguard 11.16 and later, these commands can be done by non-root users, according to access policies in the cluster’s configuration files. See Editing Security Files, in Chapter 5, for more information about configuring access. You can use Serviceguard Manager or the Serviceguard command line 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 Serviceguard Manager or on the Serviceguard command line. 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 “Run package <pkgname>” or “Run package <pkgname> on node...” with 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 include messages for starting the package. The cluster must be running in order to start a package. 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 a 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 Serviceguard Manager or on the Serviceguard command line. 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 package <pkgname>.” The package must be running. The progress window shows messages as the action takes place. This will include a message for halting the package. You can use Serviceguard Manager or Serviceguard commands to move a package from one node to another. The package must be running to start the operation. You can select the package on the map or tree and drag it with your mouse to another cluster node. Or, select the icon of the package you wish to halt, and right-click to display the action list. Select “Move package to node.” Or, select the package and go to the toolbar menu and choose Actions -> Administering. The Operation Log 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. After moving, you may want to change the switching flags. You can do this from the Actions menu, or the right-click popup menu. 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. 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 flags 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. To change package switching or node switching in Serviceguard Manager, select the package on the tree or map. Either right-click it or go to the toolbar Actions menu. Click on the radio button to change between enabled or disabled. You can set node switching node by node 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. To change the AUTO-RUN parameter, you need to reconfigure the package. This is only available for Serviceguard 11.16 or later. Select the package, then choose Configuring from the Actions menu (on toolbar or right-click menu). As on the command line, you need root permission on the cluster to create or modify configuration. You can change package switching behavior either temporarily or permanently using 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. |
|||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||