Sun Cluster Data Service for N1 Grid Service Provisioning System for Solaris OS

Installing and Configuring Sun Cluster HA for N1 Service Provisioning System

Accessing Sun Documentation Online

The docs.sun.comSM Web site enables you to access Sun technical documentation online. You can browse the docs.sun.com archive or search for a specific book title or subject. The URL is http://docs.sun.com.

Ordering Sun Documentation

Sun Microsystems offers select product documentation in print. For a list of documents and how to order them, see “Buy printed documentation” at http://docs.sun.com.

Typographic Conventions

The following table describes the typographic changes used in this book.

Table 1–1 Typographic Conventions

Typeface or Symbol 

Meaning 

Example 

AaBbCc123

 The names of commands, files, and directories; on-screen computer output

Edit your .login file.

Use ls -a to list all files.

machine_name% you have mail.

AaBbCc123

 What you type, contrasted with on-screen computer output

machine_name% su

Password:

AaBbCc123

 Command-line placeholder: replace with a real name or value

To delete a file, type rm filename.

AaBbCc123

Book titles, new words, or terms, or words to be emphasized. 

Read Chapter 6 in User's Guide.

These are called class options.

You must be root to do this.

Shell Prompts in Command Examples

The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.

Table 1–2 Shell Prompts

Shell 

Prompt 

 C shell promptmachine_name%
 C shell superuser promptmachine_name#
 Bourne shell and Korn shell prompt$
 Bourne shell and Korn shell superuser prompt#

Installing and Configuring Sun Cluster HA for N1 Service Provisioning System

Table 1–3 list the tasks for installing and configuring Sun Cluster HA for N1 Service Provisioning System. Perform these tasks in the order they are listed.

Table 1–3 Task Map: Installing and Configuring Sun Cluster HA for N1 Service Provisioning System

Task 

For Instructions, Go To 

1 Plan the installation. 

Planning the Sun Cluster HA for N1 Service Provisioning System Installation and Configuration

2 Install and configure the N1 Grid Service Provisioning System. 

Installing and Configuring N1 Grid Service Provisioning System

3 Verify installation and configuration. 

How to Verify the Installation and Configuration of N1 Grid Service Provisioning System Master Server

4 Install Sun Cluster HA for N1 Service Provisioning System Packages. 

Installing the Sun Cluster HA for N1 Grid Service Provisioning System Packages

5 Register and configure Sun Cluster HA for N1 Service Provisioning System components 

Registering and Configuring Sun Cluster HA for N1 Service Provisioning System

5.1 Register and configure Sun Cluster HA for N1 Service Provisioning System Master Server as a failover data service. 

How to Register and Configure Sun Cluster HA for N1 Service Provisioning System Master Server as a failover data service

5.2 Register and configure Sun Cluster HA for N1 Service Provisioning System Remote Agent as a failover data service. 

How to Register and Configure Sun Cluster HA for N1 Service Provisioning System Remote Agent as a failover data service

5.3 Register and Configure Sun Cluster HA for N1 Service Provisioning System Local Distributor as a failover data service. 

How to Register and Configure Sun Cluster HA for N1 Service Provisioning System Local Distributor as a failover data service

6 Verify Sun Cluster HA for N1 Service Provisioning System Installation and Configuration. 

How to Verify the Sun Cluster HA for N1 Service Provisioning System Installation and Configuration

7 Understanding the Sun Cluster HA for N1 Service Provisioning System parameter file. 

Understanding the Sun Cluster HA for N1 Service Provisioning System Master Server Parameter File

8 Understanding the Sun Cluster HA for N1 Service Provisioning System Fault Monitor. 

Understanding the fault monitor of the Sun Cluster HA for N1 Service Provisioning System

9 How to debug Sun Cluster HA for N1 Service Provisioning System. 

How to turn debug on for a Sun Cluster HA for N1 Service Provisioning System component

Sun Cluster HA for N1 Service Provisioning System

The N1 Grid Service Provisioning System is Sun Microsystems product for service (software) Distribution in the N1 environment. It consists of four components:

  1. The Master Server which is the core component for the service distribution.

  2. The client component is called Remote Agent. It has to run on every target host.

  3. A proxy component called Local Distributor. The Local Distributor is used to minimize data transfer between datacenters.

  4. A command line interface which can be installed on every host.

The Master Server is built upon Apache Tomcat and the PostgreSql Database. All other components are pure Java.

The Sun Cluster HA for N1 Service Provisioning System data service provides mechanisms for orderly startup and shutdown, fault monitoring, and automatic failover of the Master Server, the Remote Agent and the Local Distributor.

The following table describes the relation between the application components and the related Sun Cluster data service.

Table 1–4 Protection of Components

Component

Protected by

Master Server 

Sun Cluster HA for N1 Service Provisioning System 

Remote Agent 

Sun Cluster HA for N1 Service Provisioning System 

Local Distributor 

Sun Cluster HA for N1 Service Provisioning System 

Planning the Sun Cluster HA for N1 Service Provisioning System Installation and Configuration

This section contains the information you need to plan your Sun Cluster HA for N1 Service Provisioning System installation and configuration.

Configuration Restrictions

This paragraph provides a list of software and hardware configuration restrictions that apply to Sun Cluster HA for N1 Service Provisioning System only.

For restrictions that apply to all data services, see the Sun Cluster Release Notes.


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these restrictions.


Configuration Requirements

These requirements apply to Sun Cluster HA for N1 Service Provisioning System only. You must meet these requirements before you proceed with your Sun Cluster HA for N1 Service Provisioning System installation and configuration.


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these requirements.


Each component of Sun Cluster HA for N1 Service Provisioning System has configuration and registration files in the directory /opt/SUNWscsps/component-dir/util — The term component-dir stands for the directory names master, localdist or remoteagent. These files let you register the N1 Grid Service Provisioning System component with Sun Cluster.

Within these files, you apply the appropriate dependencies.

Installing and Configuring N1 Grid Service Provisioning System

This section contains the procedures for installing and configuring N1 Grid Service Provisioning System components. The components are the Master Server, the Remote Agent and the Local Distributor.

Installation of the N1 Grid Service Provisioning System components
  1. Determine how N1 Grid Service Provisioning System will be deployed in the Sun Cluster

    • Determine which component of the N1 Grid Service Provisioning System you will use.

    • Determine which user name will run N1 Grid Service Provisioning System component.

    • Determine how many N1 Grid Service Provisioning System component versions and instances will be deployed.

    • Determine which Cluster File System will be used by each N1 Grid Service Provisioning System component instance.

  2. Mount the N1 Grid Service Provisioning Systems Cluster File Systems

  3. Create user and group if required — If the N1 Grid Service Provisioning System is to run under a non root user, you have to create the appropriate user, and the appropriate group. For these tasks use the following commands on every node.


    # groupadd —g 1000 sps
    # useradd —u 1000 —g 1000 —d /global/sps —s /bin/ksh sps
    

    Now you have to set up a resource group and the appropriate storage and logical host resources for the N1 Grid Service Provisioning System component. The component is either the Master Server, the Remote Agent, or the Local Distributor. These steps are required before proceeding with the N1 Grid Service Provisioning System resources. Perform the steps Step 4 to Step 9on one node only

  4. Register the SUNW.HAStoragePlus resource type.

    It is assumed that the file system of the N1 Grid Service Provisioning System component will be mounted as a failover file system.


    # scrgadm -a -t SUNW.HAStoragePlus
    
  5. Create a failover resource group.


    # scrgadm -a -g N1sps-component-resource-group
    
  6. Create a resource for the N1 Grid Service Provisioning System component Disk Storage.


    # scrgadm -a -j N1sps-component-has-resource  \
    > -g N1sps-component-resource-group   \
    > -t SUNW.HAStoragePlus  \
    > -x FilesystemMountPoints=N1sps-component-instance-mount-points
    
  7. Create a resource for the N1 Grid Service Provisioning System Master component Logical Host name.


    # scrgadm -a -L -j N1sps-component-logical-hostname  \
    > -g N1sps-component-resource-group  \
    > -l N1sps-component-logical-hostname
    
  8. Enable the failover resource group, which now includes the N1 Grid Service Provisioning System Disk Storage and Logical Hostname resources.


    # scswitch -Z -g  N1sps-component-resource-group
    
  9. Install the N1 Grid Service Provisioning System components — Install the appropriate N1 Grid Service Provisioning System components on one node. Use a shared file system within Sun Cluster for the installation location.

    It is recommended that you install N1 Grid Service Provisioning System onto shared disks. For a discussion of the advantages and disadvantages of installing the software on a local versus a cluster file system, see “Determining the Location of the Application Binaries” in the Sun Cluster Data Services Installation and Configuration Guide.


    Note –

    Refer to the N1 Grid Service Provisioning System product documentation on http://docs.sun.com for instructions about installing N1 Grid Service Provisioning System. For more information about N1 Grid Service Provisioning System, refer to the docs.sun.com web page.


Verifying the Installation and Configuration of N1 Grid Service Provisioning System

This section contains the procedure you need for verifying the installation and configuration of N1 Grid Service Provisioning System.

This procedure does not verify that your applications are highly available because you have not installed your data service yet. Select the appropriate procedure for the N1 Grid Service Provisioning System application you installed.

How to Verify the Installation and Configuration of N1 Grid Service Provisioning System Master Server

This procedure is for the installation verification of the master server.

  1. Start the N1 Grid Service Provisioning System Master Server.

    Switch to the N1 Grid Service Provisioning System Master Servers user name (in the following example, it is sps) and change to the directory where the software is located. In the following example the software version is 4.1.


    Note –

    The output messages of the start and shutdown commands are highly version dependent.



     # su -  sps
    $ cd N1_Service_Provisioning_System_4.1
    $cd server/bin
    $./cr_server start
    *** Starting database
    *** Starting cr_server
  2. Check the Installation

    Start a web browser and connect to the cluster node with http://logical-hostname:port. The port is the web administration port configured in the installation procedure of the master server. If you see the default N1 Grid Service Provisioning System login page everything is working correctly.

  3. Stop the N1 Grid Service Provisioning System Master Server.


     $ ./cr_server stop
    *** Stopping cr_server
    Waiting for CR to complete shutdown...
    *** Stopping database
    waiting for postmaster to shut down.......done
    postmaster successfully shut down

How to Verify the Installation and Configuration of N1 Grid Service Provisioning System Remote Agent

This procedure is for the installation verification of the N1 Grid Service Provisioning System Remote Agent.

  1. Start the N1 Grid Service Provisioning System Remote Agent.

    Switch to the N1 Grid Service Provisioning System Remote Agents user name (in the following example, it is sps) and change to the directory where the software is located. In the following example the software version is 4.1.


    Note –

    The output messages of the start and shutdown commands are highly version dependent.



     # su -  sps
    $ cd N1_Service_Provisioning_System
    $cd agent/bin
    $./cr_agent start
    *** Starting cr_agent
  2. Check the Installation

    Check the process table with the following command:


    $ /usr/ucb/ps -auxww |grep java|grep agent >/dev/null;echo $? 
    0

    If the response is 0, everything is working correctly. You may omit the |grep agent >/dev/null;echo $? in this case you have to see a java process with agent in the process string.

  3. Stop the N1 Grid Service Provisioning System Remote Agent.


     $ ./cr_agent stop
    *** Stopping cr_agent

How to Verify the Installation and Configuration of N1 Grid Service Provisioning System Local Distributor

This procedure is for the installation verification of the N1 Grid Service Provisioning System Local Distributor.

  1. Start the N1 Grid Service Provisioning System Local Distributor.

    Switch to the N1 Grid Service Provisioning System Remote Agents user name (in the following example, it is sps) and change to the directory the software is located. In the following example the software version is 4.1.


    Note –

    The output messages of the start and shutdown commands are highly version dependent.



     # su -  sps
    $ cd N1_Service_Provisioning_System
    $cd ld/bin
    $./cr_ld start
    *** Starting cr_ld
  2. Check the Installation

    Check the process table with the following command:


    $ /usr/ucb/ps -auxww |grep java|grep ld>/dev/null;echo $?
    0

    If the response is 0, everything is working correctly. You may omit the |grep ld>/dev/null;echo $? in this case you have to see a java process with ld in the process string.

  3. Stop the N1 Grid Service Provisioning System Local Distributor.


     $ ./cr_ld stop
    *** Stopping cr_ld

Installing the Sun Cluster HA for N1 Grid Service Provisioning System Packages

If you did not install the Sun Cluster HA for N1 Service Provisioning System packages during your initial Sun Cluster installation, perform this procedure to install the packages. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for N1 Service Provisioning System packages. To complete this procedure, you need the Sun Java Enterprise System Accessory CD Volume 3.

If you are installing more than one data service simultaneously, perform the procedure in “Installing the Software” in Sun Cluster 3.1 10/03 Software Installation Guide.

Install the Sun Cluster HA for N1 Service Provisioning System packages by using one of the following installation tools:


Note –

The Web Start program is not available in releases earlier than Sun Cluster 3.1 Data Services 10/03.


How to Install the Sun Cluster HA for N1 Service Provisioning System Packages Using the Web Start Program

You can run the Web Start program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar. For more information about the Web Start program, see the installer(1M) man page.

  1. Become superuser on the cluster node where you are installing the Sun Cluster HA for N1 Service Provisioning System packages.

  2. (Optional) If you intend to run the Web Start program with a GUI, ensure that your DISPLAY environment variable is set.

  3. Load the Sun Java Enterprise System Accessory CD Volume 3 into the CD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom/cdrom0 directory.

  4. Change to the Sun Cluster HA for N1 Service Provisioning System component directory of the CD-ROM.

    The Web Start program for the Sun Cluster HA for N1 Service Provisioning System data service resides in this directory.


    # cd /cdrom/cdrom0/components/SunCluster_HA_N1G_SPS_3.1
    
  5. Start the Web Start program.


    # ./installer
    
  6. When you are prompted, select the type of installation.

    • To install only the C locale, select Typical.

    • To install other locales, select Custom.

  7. Follow instructions on the screen to install the Sun Cluster HA for N1 Service Provisioning System packages on the node.

    After the installation is finished, the Web Start program provides an installation summary. This summary enables you to view logs that the Web Start program created during the installation. These logs are located in the /var/sadm/install/logs directory.

  8. Exit the Web Start program.

  9. Unload the Sun Java Enterprise System Accessory CD Volume 3 from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      

How to Install the Sun Cluster HA for N1 Service Provisioning System Packages Using the scinstall Utility

You need the Sun Cluster Agents CD-ROM to perform this procedure. It is assumed that you did not install the data service during your initial Sun Cluster installation.

If you installed Sun Cluster HA for N1 Service Provisioning System as a part of your initial Sun Cluster installation, proceed to Registering and Configuring Sun Cluster HA for N1 Service Provisioning System.

Perform this procedure, on all nodes that can run Sun Cluster HA for N1 Service Provisioning System.

  1. Load the Sun Cluster Agents CD-ROM into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    The scinstall utility prompts you for additional information.

  3. Chose the menu option, Add Support for New Data Service to this Cluster Node

    This step starts the scinstall utility in interactive mode.

  4. Provide the pathname to the Sun Cluster Agents CD-ROM.

    The utility refers to the CD as “data services cd.”

  5. Chose the menu option, q) done.

  6. Type yes for the question, Do you want to see more data services?

    The utility refers to the CD as “data services cd.”

  7. Specify the data service to install.

    The scinstall utility lists the data service that you selected and asks you to confirm your choice.

  8. Exit the scinstall utility.

  9. Unload the CD from the CD-ROM drive.

Preparation of the N1 Grid Service Provisioning System Master Servers database

In this section you prepare the database of the N1 Grid Service Provisioning System Master Server. It needs to contain the user sc_test and the table sc_test. The user and the table are needed to monitor the PostgreSql database. The script db_prep_postgres is provided to create the user and the table.

Preparation of the Master Servers database.
  1. Start the N1 Grid Service Provisioning System Master Server as described in How to Verify the Installation and Configuration of N1 Grid Service Provisioning System Master Server.

  2. Remain within the user of the Master Server and prepare the database.

    For the preparation of the database you need the N1 Grid Service Provisioning System Master Servers base directory. It is the directoy that contains the server/bin directory. You prepare the database with the following command:


    $/opt/SUNWscsps/master/util/db_prep_postgres <Base Directory of the master Server>
    CREATE USER
    CREATE

    An example for the Base Directory is:/global/sps/N1_Service_Provisioning_System_4.1.

  3. Stop the N1 Grid Service Provisioning System Master Server as described inHow to Verify the Installation and Configuration of N1 Grid Service Provisioning System Master Server.

Registering and Configuring Sun Cluster HA for N1 Service Provisioning System

This section contains the procedures you need to configure the Master Server, the Remote Agent, or the Local Distributor of Sun Cluster HA for N1 Service Provisioning System.

How to Register and Configure Sun Cluster HA for N1 Service Provisioning System Master Server as a failover data service

This procedure assumes that you installed the data service packages.

If you did not install the Sun Cluster HA for N1 Service Provisioning System packages, go to Installing the Sun Cluster HA for N1 Grid Service Provisioning System Packages.

  1. Become superuser on one of the nodes in the cluster that will host N1 Grid Service Provisioning System Master Server.

  2. Register the SUNW.gds resource type.


    # scrgadm -a -t SUNW.gds
    
  3. Prepare the parameter file, which is required by the Sun Cluster HA for N1 Service Provisioning System Master Server.


    Caution – Caution –

    The parameter files need to be available on every node that can host the N1 Grid Service Provisioning System Master Server data service. For a failover configuration store them on the shared storage. The parameter files cannot differ for a specific instance of N1 Grid Service Provisioning System Master Server on the various nodes.



    # cd /opt/SUNWscsps/master/bin
    # cp pfile desired place
    

    Choose a location on the shared storage for the pfile. Edit the parameter file pfile and follow the comments within that file. For example:


    #!/usr/bin/ksh
    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # Set theN1 Grid Service Provisioning System Master Server specific environment variables which the start, stop
    # and check fuctions will use
    #
    # User          Centerrun User
    # Basepath      Absolute path to Centerrun Basedir directory
    # Host          Hostname to test Apache Tomcat
    # Tport         Port where the N1 Service Prosioning Systems Apache Tomcat instance
    #               is configured to listen
    # TestCmd       Apache Tomcat test command
    # ReturnString  Use one of the strings below faccording to your Sun One Provisoning
    #               Server Version.
    #               Version 4.1 = SSL|Service
    # Startwait     Sleeping $Startwait seconds after completion of the
    #               start command
    User=
    Basepath=
    Host=
    Tport=
    TestCmd="
    ReturnString=
    Startwait=

    The following is an example for a N1 Grid Service Provisioning System 4.1 Master Server.


    User=sps
    Basepath=/global/sps/N1_Service_Provisioning_System_4.1
    Host=N1spsma-lh
    Tport=8080
    TestCmd="get /index.jsp"
    ReturnString="SSL|Service"
    Startwait=20
    

    This example is from an N1 Grid Service Provisioning System 4.1 Master Server. The Apache Tomcat is configured to listen on Port 8080. The default start page contains the string Service, or the string SSL if you configured it to respond on the SSL Port.

  4. Configure the registration scripts for each required N1 Grid Service Provisioning System Master Server instance.


    # cd /opt/SUNWscsps/master/util
    # cp spsma_config desired place
    # cp spsma_register desired place
    

    Edit the spsma_config file and follow the comments within that file. For example:


    # These parameters can be customized in (key=value) form
    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # This file will be sourced in by spsma_register and the parameters
    # listed below will be used.
    #
    # These parameters can be customized in (key=value) form
    #
    #        RS - name of the resource for the application
    #        RG - name of the resource group containing RS
    #      PORT - name of the port number to satisfy GDS registration
    #        LH - name of the LogicalHostname SC resource
    #     PFILE - name of the parameter file for additional variables
    #    HAS_RS - name of the HAStoragePlus SC resource
    #
    
    RS=
    RG=
    PORT=
    LH=
    PFILE=
    HAS_RS=

    The following is an example for the Sun Cluster HA for N1 Service Provisioning System Master Server.


    RS=N1spsma-res
    RG=N1spsma-rg
    PORT=8080
    LH=N1spsma-lh
    PFILE=/global/mnt1/N1spsma-pfile
    HAS_RS=N1spsma-hastplus-res
    

    The PORT variable is needed to satisfy the requirements of the generic data service.

  5. After editing spsma_config register the resource.


    # ./spsma_register
    Registration of resource N1spsma-rs succeeded
    Validate resource N1spsma-rs in resourcegroup spsma-rg
    Validation of resource spsma-rs succeeded
    &#
  6. Enable each N1 Grid Service Provisioning System Master Server resource.


    # scstat -g
    

    # scswitch -e -j N1spsma-resource
    

Repeat Step 3 to Step 6 for each N1 Grid Service Provisioning System Master Server instance you need.

How to Register and Configure Sun Cluster HA for N1 Service Provisioning System Remote Agent as a failover data service

This procedure assumes that you installed the data service packages.

If you did not install the Sun Cluster HA for N1 Service Provisioning System packages, go to Installing the Sun Cluster HA for N1 Grid Service Provisioning System Packages.

  1. Become superuser on one of the nodes in the cluster that will host N1 Grid Service Provisioning System Remote Agent.

  2. Register the SUNW.gds resource type.


    # scrgadm -a -t SUNW.gds
    
  3. Configure the registration scripts for each required N1 Grid Service Provisioning System Remote Agents instance.


    # cd /opt/SUNWscsps/remoteagent/util
    # cp spsra_config desired place
    # cp spsra_register desired place
    

    Edit the spsra_config file and follow the comments within that file. For example:


    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # This file will be sourced in by spsra_register and the parameters
    # listed below will be used.
    #
    # These parameters can be customized in (key=value) form
    #
    #        RS - name of the resource for the application
    #        RG - name of the resource group containing RS
    #      PORT - name of the port number to satisfy GDS registration
    #        LH - name of the LogicalHostname SC resource
    #      USER - name of the owner of the remote agent
    #      BASE - name of the direcotry where the N1 Service Provisioning Server
    #             is installed
    #    HAS_RS - name of the HAStoragePlus SC resource
    #
    
    RS=
    RG=
    PORT=
    LH=
    USER=
    BASE=
    HAS_RS=

    The following is an example for the N1 Grid Service Provisioning System 4.1 Remote Agent.


    RS=N1spsra-res
    RG=N1spsra-rg
    PORT=22
    LH=N1spsra-lh
    USER=sps
    BASE=/global/sps/N1_Service_Provisioning_System
    HAS_RS=N1spsra-hastplus-res
    

    The PORT variable is needed to satisfy the requirements of the generic data service.

  4. After editing spsra_config register the resource.


    # ./spsra_register
    Registration of resource N1spsra-rs succeeded
    Validate resource N1spsra-rs in resourcegroup N1spsra-rg
    Validation of resource N1spsra-rs succeeded
  5. Enable each N1 Grid Service Provisioning System Remote Agent resource.


    # scstat -g
    

    # scswitch -e -j N1spsra-resource
    

Repeat Step 3 to Step 6 for each N1 Grid Service Provisioning System Remote Agent instance you need.

How to Register and Configure Sun Cluster HA for N1 Service Provisioning System Local Distributor as a failover data service

This procedure assumes that you installed the data service packages.

If you did not install the Sun Cluster HA for N1 Service Provisioning System packages, go to Installing the Sun Cluster HA for N1 Grid Service Provisioning System Packages.

  1. Become superuser on one of the nodes in the cluster that will host N1 Grid Service Provisioning System Local Distributor.

  2. Register the SUNW.gds resource type.


    # scrgadm -a -t SUNW.gds
    
  3. Configure the registration scripts for each required N1 Grid Service Provisioning System Local Distributor instance.


    # cd /opt/SUNWscsps/localdist/util
    # cp spsld_config desired place
    # cp spsld_register desired place
    

    Edit the spsld_config file and follow the comments within that file. For example:


    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # This file will be sourced in by spsld_register and the parameters
    # listed below will be used.
    #
    # These parameters can be customized in (key=value) form
    #
    #        RS - name of the resource for the application
    #        RG - name of the resource group containing RS
    #      PORT - name of the port number to satisfy GDS registration
    #        LH - name of the LogicalHostname SC resource
    #      USER - name of the owner of the local distributor
    #      BASE - name of the directory where the N1 Service Provisioning Server
    #             is installed
    #    HAS_RS - name of the HAStoragePlus SC resource
    #
    
    RS=
    RG=
    PORT=22
    LH=
    USER=
    BASE=
    HAS_RS=

    The following is an example for N1 Grid Service Provisioning System 4.1 Local Distributor.


    RS=N1spsld-res
    RG=N1spsld-rg
    PORT=22
    LH=N1spsld-lh
    USER=sps
    BASE=/global/sps/N1_Service_Provisioning_System_4.1
    HAS_RS=N1spsld-hastplus-res
    

    The PORT variable is needed to satisfy the requirements of the generic data service.

  4. After editing spsld_config register the resource.


    # ./spsld_register
    Registration of resource N1spsld-rs succeeded
    Validate resource N1spsld-rs in resourcegroup N1spsld-rg
    Validation of resource N1spsld-rs succeeded
  5. Enable each N1 Grid Service Provisioning System Local Distributor resource.


    # scstat -g
    

    # scswitch -e -j N1spsra-resource
    

Repeat Step 3 to Step 5 for each N1 Grid Service Provisioning System Local Distributor instance you need.

Verifying the Sun Cluster HA for N1 Service Provisioning System and Configuration

This section contains the procedure you need to verify that you installed and configured your data service correctly.

How to Verify the Sun Cluster HA for N1 Service Provisioning System Installation and Configuration

  1. Become superuser on one of the nodes in the cluster which will host the N1 Grid Service Provisioning System component. A component can be the Master Server, the Remote Agent or the Local Distributor.

  2. Ensure all the N1 Grid Service Provisioning System resources are online with the command scstat .


    # scstat -g 
    

    For each N1 Grid Service Provisioning System resource which is not online, use the scswitch command as follows.


    # scswitch -e -j N1sps-resource
    
  3. Run the scswitch command to switch the N1 Grid Service Provisioning System resource group to another cluster node, such as node2 with the command described below.


    # scswitch -z -g N1sps-resource-group -h node2
    

Understanding the Sun Cluster HA for N1 Service Provisioning System Master Server Parameter File

Use the information to understand the contents of the Sun Cluster HA for N1 Service Provisioning System Master Server parameter file. This section describes the structure and the content of the Sun Cluster HA for N1 Service Provisioning System Master Server parameter file, as well as the strategy to chose some of its variables.

Structure of the Sun Cluster HA for N1 Service Provisioning System Master Servers parameter file

Sun Cluster HA for N1 Service Provisioning System for the master server uses a parameter file to pass parameters to the start, stop and probe command. This parameter file needs to be a valid Korn shell script which sets several variables. The structure of this file appears in Table 1–6. For examples of the parameter file refer to Registering and Configuring Sun Cluster HA for N1 Service Provisioning System.

Table 1–6 Structure of the Sun Cluster HA for N1 Service Provisioning System Master Servers parameter file

Variable 

Explanation 

User 

The owner of the N1 Grid Service Provisioning System Master Server instance. 

Basepath 

Basepath is the absolute pathname to the directory where the N1 Grid Service Provisioning System/server/bin directory resides. It is the directory you specified at installation time. 

Host 

The Host variable is the Host to test the functionality of the Apache Tomcat component of the N1 Grid Service Provisioning System Master Server. The test is done via a connection to Host:Tport. 

Tport 

A Port where the N1 Grid Service Provisioning Systems Apache Tomcat component is serving. This Port is used together with the Host to test the functionality of the Apache Tomcat server process of the N1 Grid Service Provisioning System Master Server. 

TestCmd 

This variable represents the command which is passed to the N1 Grid Service Provisioning Systems Apache Tomcat server process to do a sanity check. 

ReturnString 

The variable ReturnString represents the string which must be present in the answer to the TestCmd. It can not be “Connection refused” because this string is in the answer when the N1 Grid Service Provisioning Systems Apache Tomcat server process is not running.

Startwait 

This variable stands for the number of seconds to wait after the N1 Grid Service Provisioning System Master Server start command is completed. It lasts until the Apache Tomcat server process of the N1 Grid Service Provisioning System Master Server is fully operational. The absolute number of seconds depends on the speed and the load of the Hardware. A good strategy is to start with 60 seconds. 

The parameters in Table 1–6 can be changed at any time. The only difference is when changes take effect.

The following parameters of the Sun Cluster HA for N1 Service Provisioning System parameter file are used for starting and stopping the Master Server. Changes to these parameters take effect at every restart or disabling and enabling of a N1 Grid Service Provisioning System Master Server resource.

The following parameters of the Sun Cluster HA for N1 Service Provisioning System Master Server parameter file are used within the fault monitor. Changes to these parameters take effect at every Thorough_probe_interval.

Strategy to Chose the TestCmd and the ReturnString Variable

The ReturnString has to be present on the page you query with the test command TestCmd.

You can evaluate the different pages by connecting using a browser with hostname:port and specifying the different pages.

Understanding the fault monitor of the Sun Cluster HA for N1 Service Provisioning System

This section describes the Sun Cluster HA for N1 Service Provisioning System fault monitor's probing algorithm and functionality, states the conditions, messages, recovery actions, and states the conditions and messages associated with unsuccessful probing.

For conceptual information on fault monitors, see the Sun Cluster Concepts Guide.

Resource Properties

The Sun Cluster HA for N1 Service Provisioning System fault monitor uses the same resource properties as the resource type SUNW.gds. Refer to the SUNW.gds(5) man page for a complete list of resource properties used.

Probing Algorithm and Functionality for the N1 Grid Service Provisioning System Master Server

The probing of the Master Server consists of two parts. One to probe the Apache Tomcat and a second part to probe the database.

The following steps are executed to monitor the sanity of the N1 Grid Service Provisioning System Master Server.

  1. Sleeps for Thorough_probe_interval.

  2. Pings the Host, which is configured in the Sun Cluster HA for N1 Service Provisioning System Master Server parameter file.

  3. Connects to the Apache Tomcat via Host and Port. If the connection is successful it sends the TestCmd and tests whether the ReturnString comes back. If it fails, it is rescheduled after 5 seconds. If this fails again, then the probe will restart the Sun Cluster HA for N1 Service Provisioning System.


    Caution – Caution –

    The ReturnString cannot be Connection refused because this string will be returned if no connection is possible.


  4. If the Apache Tomcat is operational, the probe manipulates the database table sc_test. If the connection to the database or the table manipulation is unsuccessful, the N1 Grid Service Provisioning System Master server will be restarted.

  5. If the Apache Tomcat process and all the database processes died, pmf will interrupt the probe to immediately restart the N1 Grid Service Provisioning System Master Server.

  6. If the N1 Grid Service Provisioning System Master Server is repeatedly restarted and subsequently exhausts the Retry_count within the Retry_interval, then a failover is initiated for the resource group onto another node. This is done if the resource property Failover_enabled is set to TRUE.

Probing Algorithm and Functionality for the N1 Grid Service Provisioning System Remote Agent

The probing of the Remote Agent is done by pmf only.

The following steps are executed to monitor the N1 Grid Service Provisioning System Remote Agent.

  1. If the process of the Remote Agent has died, pmf will immediately restart the N1 Grid Service Provisioning System Remote Agent.

  2. If the N1 Grid Service Provisioning System Remote Agent is repeatedly restarted and subsequently exhausts the Retry_count within the Retry_interval, then a failover is initiated for the resource group onto another node. This is done if the resource property Failover_enabled is set to TRUE.

Probing Algorithm and Functionality for the N1 Grid Service Provisioning System Local Distributor

The probing of the Local Distributor is done by pmf only.

The following steps are executed to monitor the N1 Grid Service Provisioning System Local Distributor.

  1. If the process of the Local Distributor has died, pmf will immediately restart the N1 Grid Service Provisioning System Local Distributor.

  2. If the N1 Grid Service Provisioning System Local Distributor is repeatedly restarted and subsequently exhausts the Retry_count within the Retry_interval, then a failover is initiated for the resource group onto another node. This is done if the resource property Failover_enabled is set to TRUE.

How to debug Sun Cluster HA for N1 Service Provisioning System

Sun Cluster HA for N1 Service Provisioning System can be used by multiple N1 Grid Service Provisioning System instances. However, it is possible to turn debug on for all N1 Grid Service Provisioning System instances or a particular N1 Grid Service Provisioning System instance. This has to be done for each component (Master Server, Remote Agent, or Local Distributor) on its own.

The Sun Cluster HA for N1 Service Provisioning System component has a DEBUG file under /opt/SUNWscsps/component-dir/etc. The directories of these components are master for the Master Server, remoteagent for the Remote Agent, and localdist for the Local Distributor.

This file allows you to switch debug on for all instances of a N1 Grid Service Provisioning System component, or for a specific instance of a N1 Grid Service Provisioning System component on a particular node in a Sun Cluster. If you require debug to be switched on for Sun Cluster HA for N1 Service Provisioning System across the whole Sun Cluster, you will need to repeat this step on all nodes within Sun Cluster.

How to turn debug on for a Sun Cluster HA for N1 Service Provisioning System component

Perform these steps for the Sun Cluster HA for N1 Service Provisioning System component that requires debug output, on each node of Sun Cluster as required.

  1. Edit /etc/syslog.conf and change daemon.notice to daemon.debug.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                     operator
    #

    Change the daemon.notice to daemon.debug and restart syslogd. Note that the output below, from the command grep daemon /etc/syslog.conf, shows that daemon.debug has now been set.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.debug;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                    operator
    #
    # pkill -1 syslogd
    
  2. Edit /opt/SUNWscsps/component-dir/etc/config and change DEBUG= to DEBUG=ALL or DEBUG=resource


    # cat /opt/SUNWscsps/component-dir/etc/config
    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # Usage:
    #       DEBUG=<RESOURCE_NAME> or ALL
    #
    DEBUG=ALL
    #

    Possible values for the component-dir are master for the Master Server, remoteagent for the Remote Agent, and localdist for the Local Distributor.


    Note –

    To turn off debug, reverse the steps above.