Oracle Solaris Cluster Generic Data Service (GDS) Guide

Exit Print View

Updated: July 2014, E48652-01
 
 

ORCL.gds method_command Extension Properties

The table below lists the ORCL.gds method_command extension properties. See The method_command Sequence for more information.

Property Name
Required
Comments
Boot_command
No
Any UNIX command.
Fini_command
No
Any UNIX command.
Init_command
No
Any UNIX command.
Start_command
Yes
Any UNIX command.
Stop_command
Yes/No
Any UNIX command. Required if PMF_managed=FALSE.
Validate_command
No
Any UNIX command.
Probe_command
No
Any UNIX command. If PMF_managed=TRUE is set, an internal probe is used.

Boot_command Property

The Boot_command is not a required property. If set, this command must be a UNIX command with arguments that can be passed directly to a shell.

Fini_command Property

The Fini_command is not a required property. If set, this command must be a UNIX command with arguments that can be passed directly to a shell.

Init_command Property

The Init_command is not a required property. If set, this command must be a UNIX command with arguments that can be passed directly to a shell.

Start_command Property

The Start_command is a required property and starts the application. This command must be a UNIX command with arguments that can be passed directly to a shell to start the application.

The application in this context can be any software application in a traditional sense, but it could also just be a UNIX command similar to either of the following lines:

Start_command=path to start my software application
Start_command="/usr/bin/touch  /var/tmp/myrs"

Note -  If the Start_command does not leave behind at least one process, then PMF_managed=FALSE must be set. See PMF_managed Property for more information. Furthermore, if PMF_managed=FALSE is set, then the Stop_command property is also required.

Note -  If the default Wait_for_online=TRUE is set, then the Probe_command is executed within the Start callback method to determine if the application is online. GDSv2 passes an argument to the Probe_command to indicate if the Probe_command is being called within the Start callback method or if the Probe_command is being called by the GDSv2 probe after the resource has started successfully and is now online.

Passing an argument to the Probe_command provides the ability to code different behavior within the Probe_command when the resource is being started or after the resource has been started and is now online.

That argument is passed as the last argument to Probe_command and can contain the values gds_start when the Probe_command is executed within the Start callback method or gds_probe when the Probe_command is executed after the resource has started successfully and is now online.

See the /opt/ORCLscgds/demo/demo_probe file for an example. Following is a snippet of code from demo_probe that assigns the last passed argument to the method variable:

#!/usr/bin/ksh
eval typeset -r method=\$$#

Stop_command Property

The Stop_command is not a required property. If set, this command must be a UNIX command with arguments that can be passed directly to a shell.


Note -  If PMF_managed=FALSE is set, then the Stop_command property is a required property.

Validate_command Property

The Validate_command is not a required property. If set, this command must be a UNIX command with arguments that can be passed directly to a shell.

When a resource is created, GDSv2 passes all resource properties as arguments to the Validate_command. When a resource property is updated, GDSv2 passes just those properties that are being updated.

The /opt/ORCLscgds/lib/gds_functions file provides helper function gds_opts() to process those arguments as upper case KSH global variables. Property values are as defined.

See the /opt/ORCLscgds/demo/demo_validate file for an example. Following is a snippet of code from demo_validate:

#!/usr/bin/ksh
. /opt/ORCLscgds/lib/gds_functions
get_opts "$@"

Note -  Additionally, the function get_opts() processes an argument that GDSv2 supplies that is not a resource property but instead reflects per-node status about SUNW.HAStoragePlus resources that are used by this resource.

The KSH global variable HASP returns the following status codes:

SCDS_HASP_NO_RESOURCE

Indicates that the resource does not depend on a SUNW.HAStoragePlus resource.

SCDS_HASP_ERR_CONFIG

Indicates that at least one of the SUNW.HAStoragePlus resources on which the resource depends is located in a different resource group.

SCDS_HASP_NOT_ONLINE

Indicates that a SUNW.HAStoragePlus resource on which the resource depends is not online on any potential primary node.

SCDS_HASP_ONLINE_NOT_LOCAL

Indicates that at least one SUNW.HAStoragePlus resource on which the resource depends is online, but on another node.

SCDS_HASP_ONLINE_LOCAL

Indicates that all SUNW.HAStoragePlus resources on which the resource depends are online on the node.

The preceding status codes have precedence over each other in the order in which they appear. For example, if a SUNW.HAStoragePlus resource is not online and another SUNW.HAStoragePlus is online on a different node, the status code is set to SCDS_HASP_NOT_ONLINE rather than SCDS_HASP_ONLINE_NOT_LOCAL.

Furthermore, if the SUNW.HAStoragePlus resource is managing a global file system, then the per-node HASP resource will report SCDS_HASP_ONLINE_LOCAL on the node where the SUNW.HAStoragePlus resource is online and SCDS_HASP_ONLINE_NOT_LOCAL on the other nodes.