JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Data Services Developer's Guide     Oracle Solaris Cluster 4.0
search filter icon
search icon

Document Information

Preface

1.  Overview of Resource Management

2.  Developing a Data Service

3.  Resource Management API Reference

4.  Modifying a Resource Type

5.  Sample Data Service

6.  Data Service Development Library

7.  Designing Resource Types

8.  Sample DSDL Resource Type Implementation

9.  Oracle Solaris Cluster Agent Builder

10.  Generic Data Service

Generic Data Service Concepts

Precompiled Resource Type

Advantages and Disadvantages of Using the GDS

Ways to Create a Service That Uses the GDS

GDS and Agent Builder

GDS and Oracle Solaris Cluster Administration Commands

Selecting the Method to Use to Create a GDS-Based Service

How the GDS Logs Events

GDS Log Files

Required GDS Properties

Port_list Property

Start_command Property

Optional GDS Properties

Child_mon_level Property

Failover_enabled Property

Log_level Property

Monitor_retry_count Property

Monitor_retry_interval Property

Network_aware Property

Network_resources_used Property

Probe_command Property

Probe_timeout Property

Start_timeout Property

Stop_command Property

Stop_signal Property

Stop_timeout Property

Validate_command Property

Validate_timeout Property

Using Agent Builder to Create a Service That Uses the GDS

Creating and Configuring GDS-Based Scripts

How to Start Agent Builder and Create the Scripts

How to Configure the Scripts

Output From Agent Builder

Using Oracle Solaris Cluster Administration Commands to Create a Service That Uses the GDS

How to Use Oracle Solaris Cluster Administration Commands to Create a Highly Available Service That Uses the GDS

How to Use Oracle Solaris Cluster Administration Commands to Create a Scalable Service That Uses the GDS

Command-Line Interface for Agent Builder

How to Use the Command-Line Version of Agent Builder to Create a Service That Uses GDS

11.  DSDL API Functions

12.  Cluster Reconfiguration Notification Protocol

A.  Sample Data Service Code Listings

B.  DSDL Sample Resource Type Code Listings

C.  Requirements for Non-Cluster-Aware Applications

D.  Document Type Definitions for the CRNP

E.  CrnpClient.java Application

Index

Using Agent Builder to Create a Service That Uses the GDS

You can use Agent Builder to create the service that uses the GDS. Agent Builder is described in more detail in Chapter 9, Oracle Solaris Cluster Agent Builder.

Creating and Configuring GDS-Based Scripts

How to Start Agent Builder and Create the Scripts

  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
  2. Start Agent Builder.
    # /usr/cluster/bin/scdsbuilder
  3. Type the vendor name.
  4. Type the application name.

    Note - The combination of vendor name and application name is used as the name of the package for the scripts.


  5. Go to the working directory.

    You can use the Browse drop-down menu to select the directory rather than typing the path.

  6. Select whether the data service is scalable or failover.

    You do not need to select Network Aware because that setting is the default when you create the GDS.

  7. Select GDS.
  8. (Optional) Change the RT version from the default value that is shown.

    Note - You cannot use the following characters in the RT Version field: space, tab, slash (/), backslash (\), asterisk (*), question mark (?), comma (,), semicolon (;), left square bracket ([), or right square bracket (]).


  9. Click Create.

    Agent Builder creates the scripts. The results are displayed in the Output Log area.

    Note that the Create button is grayed out. You can now configure the scripts.

  10. Click Next.

    The Configure screen appears.

How to Configure the Scripts

After creating the scripts, you need to configure the new service.

  1. Type the location of the start command, or click Browse to locate the start command.

    You can specify property variables. Property variables are described in Using Property Variables.

  2. (Optional) Type the location of the stop command, or click Browse to locate the stop command.

    You can specify property variables. Property variables are described in Using Property Variables.

  3. (Optional) Type the location of the validate command, or click Browse to locate the validate command.

    You can specify property variables. Property variables are described in Using Property Variables.

  4. (Optional) Type the location of the probe command, or click Browse to locate the probe command.

    You can specify property variables. Property variables are described in Using Property Variables.

  5. (Optional) Specify new timeout values for the start, stop, validate, and probe commands.
  6. Click Configure.

    Agent Builder configures the scripts.


    Note - Agent Builder concatenates the vendor name and the application name to create the package name.


    A package for scripts is created and placed in the following directory:

    working-dir/vendor-name-application/pkg

    For example, /export/wdir/NETapp/pkg.

  7. On each node of the cluster, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.
  8. On each node of the cluster, install the completed package.
    # cd /export/wdir/NETapp/pkg
    # pkgadd -d . NETapp

    Note - This instruction applies to the SVR4 package that Agent Builder creates. If you need an IPS version of the package, use the pkgsend command to convert your SVR4 agent package to an IPS package, and use the pkg add command to install the IPS package. For more information, see the pkgsend(1) and pkg(1) man pages.


    The following files are installed by pkgadd:

    /opt/NETapp
    /opt/NETapp/README.app
    /opt/NETapp/man
    /opt/NETapp/man/man1m
    /opt/NETapp/man/man1m/removeapp.1m
    /opt/NETapp/man/man1m/startapp.1m
    /opt/NETapp/man/man1m/stopapp.1m
    /opt/NETapp/man/man1m/app_config.1m
    /opt/NETapp/util
    /opt/NETapp/util/removeapp
    /opt/NETapp/util/startapp
    /opt/NETapp/util/stopapp
    /opt/NETapp/util/app_config

    Note - The man pages and script names correspond to the application name that you typed previously on the Create screen, preceded by the script name (for example, startapp).


  9. On one node of the cluster, configure the resources and start the application.
    # /opt/NETapp/util/startapp -h logicalhostname -p port-and-protocol-list

    The arguments to the startapp script vary according to the type of resource: failover or scalable.


    Note - To determine the command line that you need to type, check the customized man page, or run the startapp script without any arguments to display a usage statement.

    To view the man pages, you need to specify the path to the man page. For example, to view the startapp(1M) man page, type:

    # man -M /opt/NETapp/man startapp

    To display a usage statement, type:

    # /opt/NETapp/util/startapp
     The resource name of LogicalHostname or SharedAddress must be
     specified. For failover services:
     Usage: startapp -h logicalhostname
              -p port-and-protocol-list
              [-n ipmpgroup-adapter-list]
     For scalable services:
     Usage: startapp -h shared-address-name
              -p port-and-protocol-list
              [-l load-balancing-policy]
              [-n ipmpgroup/adapter-list]
              [-w load-balancing-weights]

Output From Agent Builder

Agent Builder generates three scripts and a configuration file based on input that you provide when you create the package. The configuration file specifies the names of the resource group and the resource type.

The scripts are as follows:

These scripts have the same interface and behavior as the utility scripts that are generated by Agent Builder for non-GDS-based data services. The scripts are put in an Oracle Solaris package that you can reuse across multiple clusters.

You can customize the configuration file to provide your own names for resource groups or other arguments that are normally given as arguments to the scrgadm and scswitch commands. If you do not customize the scripts, Agent Builder provides default values for these arguments.