PRIMECLUSTER Installation and Administration Guide 4.1 (for Solaris(TM) Operating System)
Contents Index PreviousNext

Part 2 Installation> Chapter 6 Building Cluster Applications> 6.6 Setting Up Cluster Applications> 6.6.1 Setting Up Resources

6.6.1.1 Creating Cmdline Resources

This section describes the procedure for creating Cmdline resources.

[Flow of Cmdline resource creation]

mark1Creating resources

At the top menu of the "userApplication Configuration Wizard," select Create Resource.

[Top menu of the userApplication Configuration Wizard]

Click Next to go to the "Create Resource" screen.

mark1Selecting the resource type

Select the type of resource that you want to create.

[Create Resource]

Resource Type
Select the type of resource to be created from the types described in the table below.
Resource Name
When you create a resource, first select a resource type and then enter a resource name. The resource name must be a string of 18 or fewer characters consisting of alphanumeric characters and "_" (underscore), starting with an uppercase alphabetic character. For this name, do not use the same name ("config") as the Configuration name.

Click Next to go to the "Select SysNode" screen.

mark1Selecting the SysNode

Select the SysNode in which the resource is to exist. SysNode refers to the CIP node name used by RMS.

[Select SysNode]

Available SysNode
Of the nodes in a cluster system, only the names accessible through Web-Based Admin View are displayed.
Selected SysNode
The SysNode name in which the resource is to exist is displayed. This information is used as filtering information for the interfaces used by each resource.

From the Available SysNode, select the SysNode, and then click Add. To add all the listed SysNodes, click Add all.

To delete a SysNode, select the SysNode to be deleted from Selected SysNodes, and then click Remove. To delete all listed SysNodes, click Remove all.

Click Next to go to the "Set up each resource" page.

mark1Selecting the Cmdline creation method

Cmdline resources are general-purpose resources. By defining three scripts for starting, stopping, and monitoring the user application (program) to be monitored, you can create a resource that matches the purpose.
The scripts correspond to the following processes in RMS

Start script

It starts a program in Online processing.

Stop script

It stops a program in Offline processing.

Check script

This script is started periodically.
It notifies the user program state.

Select a method of configuring the script files and commands as the resource.

[Set up command]

Creation methods
Select the creation method from the following:

After completing the setup, click Next. This will lead you to the following operation according to the selected item:

New: "Creating new script files"
Path input: "Creating scripts by path input"

mark2Creating new script files

When you create a script, you must carefully create a script end value, a timeout value, and environmental variable. For details, see "Notes on script creation" in "Setting Up Online/Offline Scripts."
For details on the script sample, see "Sample scripts" in "Setting Up Online/Offline Scripts."

If you specify New for Creation method of Cmdline, the Start script creation screen appears.

mark3Start script creation

The Cmdline contents can be input directly into the editing area. The text copy, cut, and paste operations are enabled only in the editing area.

[Start script creation]

Stored file name
Specify the file name to be saved.
The following characters cannot be used in the file name or the arguments: back slash ("\"), tilde ("~"), percent sign ("%"), ampersand ("&"), and at sign ("@").
Even though processing is cancelled or the screen is closed during Cmdline creation, the script files are still stored in the "/opt/FJSVwvucw/scripts/start" directory. Therefore the scripts can be reused when the Cmdline resources are re-created.
The way in which scripts are stored in the following directories differs depending on the type of the script:

When specifying arguments, separate the arguments with "blank" characters. Since the scripts that can be created in this screen are Bourne shell by default, the following string is displayed at the beginning of the editing area:
#!/bin/sh
Edit
You can edit scripts from the simplified menu. The editing operation is described below:

Item

Operation

Move cursor

You can move the cursor to any position by placing the mouse pointer at the target position and single-clicking the mouse pointer or by operating the arrow keys on the keyboard in the top, bottom, left, or right directions.

Insert text

You can input characters at the cursor position.

Delete text

  • To delete 1 character
    • Press the [Delete] key to delete the character at the cursor position.
    • Press the [Backspace] key to delete the character positioned directly before the cursor position.
  • To delete a string with one or more characters, use the following keys:
    • [Delete] key
    • [Backspace] key
    • Edit -> Delete from the menu bar

Cut text

Select a string with one or more characters in the editing area and go to Edit -> Cut.

Copy text

Select a string with one or more characters in the editing area and go to Edit -> Copy.

Paste text

Position the cursor at the position where the character string that was previously cut or copied within the editing area is to be pasted, and then select Edit -> Paste.

These script files are not removed even when processing is cancelled during Cmdline creation, or the Cmdline resource or GUI package (FJSVwvucw) is removed. If you want to remove the files, you need to remove the "/opt/FJSVwvcuw/scripts/start" directory. For example, execute the "rm(1)" command to remove one script file as follows:
# rm /opt/FJSVwvucw/scripts/start/XXXXXXXX
To remove the directory, specify "/opt/FJSVwvucw/scripts/start" or "/opt/FJSVwvucw."
Note that, when you delete a Stop script or Check script, replace the "start" portion in the above directory with "stop" or "check."

Click Next to go to "Stop script creation."

mark3Stop script creation

Create a Stop script by using the same procedure as that for the Start script.

[Stop script creation]

Click Next to go to "Check script creation."

You can omit setup of this script file. Just click Next.

mark3Check script creation

Create a Check script by using the same procedure as that for the Start script.

[Check script creation]

Flags button
You can set script attributes from a dialog box. See "Setting up Cmdline flags," for details.

If "NULLDETECTOR" was set to "Yes" at the "Set Cmdline Flag" screen, a Check script does not need to be configured. In this case, the Check script is not configured as resource information because the Check script is not started from RMS.

mark2Creating scripts by path input

If a script already exists, you can enter a path to select the script.

The following characters cannot be used in the file path or the arguments: back slash ("\"), tilde ("~"), percent sign ("%"), ampersand ("&"), and at sign ("@").

[Cmdline setup]

Start script
Enter the path of the Start script. If you are specifying arguments, separate the arguments with "blanks."
The Start script is always a required script. The script must be entered with a full path name.
Stop script
Enter the path of the Stop script. If you are specifying arguments, separate the arguments with "blanks."
The Stop script is not required information. The script must be entered with a full path name.
Check script
Enter the path of the Check script. If you are specifying arguments, separate the arguments with "blanks." The script must be entered with a full path name.
Although the Check script is always a required script, it does not have to be specified if NULLDETECTOR was set to "Yes" in the "Set Cmdline Flag" screen. Even if the script is setup, the information is deleted during resource registration because the Check script is not started from RMS.
Flags button
Set the script attributes. For information, see "Setting up Cmdline flags," which is described later.

mark3Setting up Cmdline flags

The method of a controlling script defined to a Cmdline resource can be adjusted by changing the flag values.

[Set up Cmdline flags]

After completing the setup, click OK to return to the "Set up Cmdline" screen.

Flag

Outline

NULLDETECTOR

If the flag is set to "Yes", the specified Check script will be disabled. Instead, RMS assumes that the resource is Online during Online processing and Offline processing. When RMS is restarted, this resource becomes Offline.
This flag is used to register the program that starts or stops in line with Online or Offline processing as a resource.
Also, all the other flag values will be set to "No".
The default value is "No."

ALLEXITCODES

If the flag is set to "No", the exit code of the Check script will be interpreted as follows:

0: Online
Other than 0: Offline

If the flag is set to "Yes", the exit code of the Check script will be interpreted as follows:

0: Online
1: Offline
2: Faulted
3: Unknown
4: Standby
5: Online warning
6: Offline faulted

The default value is "No."

LIEOFFLINE

If this flag is set to "Yes," the resource is notified as being Offline if a Stop script is not specified. If a Stop script is specified, the failure of the script triggers fault processing.
The default value is "No."

CLUSTEREXCLUSIVE

If this flag is set to "Yes", the resource becomes Online only on one node in a cluster system. If the resource becomes Online on two or more nodes at the same time because of a script problem, the state of userApplication to which this resource belongs becomes Inconsistent.
The default value is "No."

AUTORECOVER

If this flag is set to "Yes," RMS tries to recover the resource if it becomes faulted. In this way, RMS tries to prevent the userApplication from being switched to another host
This recovery is tried only once.
The default value is "No."

MONITORONLY

This flag controls whether the "faulted" condition in the resource makes the userApplication Faulted. If this flag is set to yes, the resource becomes Faulted, but this does not make the userApplication Faulted.
The system does not allow this value to be set to "Yes" for Cmdline resources that can be created from the GUI. If you use this flag, keep the "No" setting because RMS startup will be disabled if the flag value is set to "Yes."
The default value is "No."

STANDBYCAPABLE

If this flag is set to "Yes," RMS sets the StandbyCapable attribute to 1 for this resource.

For detailed information regarding this attribute, see "9 Appendix -Attributes" in "PRIMECLUSTER Reliant Monitor Service (RMS) with Wizard Tools Configuration and Administration Guide."
The default value is "No."

REALTIME

If the flag is set to "No", the Check script will be started in the TS class (time-sharing scheduling) .
If this flag is set to "Yes," the Check script is started with the RT class (real time mode).
Note that since the operating system assigns the highest priority to processes that are started with the RT class, any bugs in the script or commands may have a large effect on system performance.
The default value is "No."

TIMEOUT

This flag sets the timeout interval (seconds) for program start and stop processing.
The default value is "300."

mark1Check Cmdline registration information

You can check a list of the scripts that has been set up previously. You can also configure resource attributes by selecting the Attributes tab and switching the screen.

For information on the resource attributes, see "Attributes."

[Confirmation of registration information]

The attributes that are displayed in the "Flag" column are only those Resource attributes for which a value has been set. For example, if No is set for the AUTORECOVER attribute, then it means that AUTORECOVER attribute has not been set, and it is not displayed in the Flag column.

SubApplication button
Associate the other Cmdline resources or process monitoring resources with the Cmdline resource that has been created above. See "Resource association."

After checking the registration information, click Registration.

mark2Resource association

Use this function to configure a startup sequence among resources of the same type.
By assigning startup priorities to resources, you can clarify the order in which the resources are to be switched to Online or Offline.
In Online processing, resources that have a high startup priority are switched to Online before resources that have a low startup priority.
Conversely in Offline processing, resources that have a low startup priority are switched to Offline before resources that have a high startup priority.
If a startup priority is not assigned or if resources have the same priority, the sequence is undefined.

[Associate resources]

Available Resource
Available resource is referred to as the resource of the same type that can be associated, and satisfies the following conditions.
Note: Cmdline and process monitoring resources are considered the same type of resources.
Selected Resource
Resources to be set under the current resource being created.

From Available Resource select the resource to be configured under the current resource, and then click Add. To add all listed resources, click Add all. To delete a resource from under the current resource, select the resource to be deleted from the Selected Resource, and then click Remove. To delete all listed resources, click Remove all.

After completing the setup, click OK, and return to the "Confirm Registration Information" screen.

In the configuration shown below, the startup priority has been set to resources of the same type.

To build this configuration, build the resources according to the procedure shown below.

  1. Create Cmdline3.
  2. Create Cmdline2, and set Cmdline3 as subApplication.
  3. Create Cmdline1, and set Cmdline2 as subApplication.
  4. Create userApplication, and set Cmdline1 as subApplication.

The procedure for building the following configuration is shown below.

  1. Create Cmdline3.
  2. Create Cmdline2.
  3. Create Cmdline1, and set Cmdline2 and Cmdline3 as subApplication.
  4. Create userApplication, and set Cmdline1 as subApplication.

In the configuration shown below, the other resources were not set as subApplication during the creation of resource.


Contents Index PreviousNext

All Rights Reserved, Copyright (C) FUJITSU LIMITED 2005