Customizing the Sun cluster scripts for Infrastructure Management high-availability

The scripts are generated while creating the cluster resource type. On each node in the cluster, edit the appropriate scripts to achieve the following tasks:

  • Disable the PMF monitoring
  • Get the proper license files
  • Start the Infrastructure Management application
  • Enable the cron jobs

The scripts are available under the /bin directory of the Solaris package generated by the agent builder.

To customize scripts to achieve high-availability

  1. Open the start script (resourceType_svc_start.ksh) for editing.
  2. Disable the PMF monitoring by entering the following command:
    pmfadm -s $PMF_TAG -a "$action -R $RESOURCE_NAME -G $RESOURCEGROUP_NAME-T $RESOURCETYPE_NAME" $start_cmd_args
    The daemon under the control of the Sun Cluster Process Monitor Facility starts. Let it crash and invoke the action script provided. The action script will restart the resource or enable high-availability and will return a non zero exit status to cease the process monitor facility.
  3. At the end of the PMF monitoring command in resourceType_svc_start.ksh file, add the following lines under the User added code placeholder section and before the line "exit 0."
    # User added code — BEGIN
    /usr/pw/pronto/bin/pw system start
    # User added code — END
  4. Copy the node-specific license files to the /usr/pw/licensesdirectory and add the appropriate extension as follows:
    • Rename the license files targeted to the primary node with the extension .primary.
    • Rename the license files targeted to the secondary node with the extension .secondary.
      The files should look as follows:
  5. Above MAIN in the start script, provide the proper licenses and enable cron jobs for Infrastructure Management as described in the following steps:
    1. On the primary node, update the license files by entering the following commands:

      update_license_file() {
      cp /usr/pw/licenses/proactivenet.lic.primary
    2. On the secondary node, update the license files by entering the following commands:

      update_license_file() {
      cp /usr/pw/licenses/proactivenet.lic.secondary
      cp /usr/pw/licenses/proactivenet.sign.secondary
    3. Create a cron folder in the /usr/pw/ directory and a file called cron_entries in the /usr/pw/cron/ directory and add the following lines:
      # begin_pronto — DO NOT DELETE THIS LINE!
      # the following entry is added for Infrastructure Management
      ## Changed on Mar 13, 2009 10:31:53:AM PST
      # 15 * * * * /usr/pw/pronto/bin/hourlyjobs >
      30 3 * * 1-6 /usr/pw/pronto/bin/dailyjobs hosts >
      30 4 * * 0 /usr/pw/pronto/bin/weeklyjobs hosts >
      30 5 * * 0 /usr/pw/pronto/bin/pw database archive
      send-email >
      /usr/pw/pronto/tmp/dbarchive$$.log 2>&1
      0,15,30,45 * * * * /usr/pw/pronto/bin/check_pronetprocs >
      ck_pronetprocs.log 2>&1
      ## end_pronto — DO NOT DELETE THIS LINE!
    4. To enable the cron jobs, specify the following path in the start script:

      enable_cron() {
      crontab -l > /tmp/$$current_cron
      while read line; do
      echo "$line" >> /tmp/$$current_cron
      done < /usr/pw/cron/cron_entries
      crontab < /tmp/$$current_cron
      rm /tmp/$$current_cron
  6. Save and close the start script.
  7. Open the stop script (resourceType_svc_stop.ksh) and edit it to disable the cron jobs and stop the Infrastructure Management application as described in the following steps.
    1. Add the following lines to the stop script:

      # The Data service is not running as of now. Log a message and
      # exit suceess.
      # SCMSGS # @explanation
      # Need explanation of this message!
      # @user_action # Need a user action for this message.
      scds_syslog -p error -t "${SYSLOG_TAG}" -m
      "resourceType not already running"
      /usr/pw/pronto/bin/pw system stop
      # Even if the resourceType is not running, we exit success,
      # For idempotency of
      # the STOP method.
      exit 0
    2. Above the Main section in the stop script, add the following function:

      disable_cron() {
      crontab -l | sed -e /begin_pronto/,/end_pronto/d > /tmp/$$pronto
      crontab < /tmp/$$pronto
      rm /tmp/$$pronto
  8. Save and close the stop script.
  9. Open the probe script (resourceType_probe.ksh), and add the following lines to support manual shutdown of the Infrastructure Management application:
    if [[ -e "/usr/pw/pronto/tmp/system.start" ]]; then
    if [[ -f $probe_cmd_prog && -x $probe_cmd_prog ]];
    then hatimerun -t $PROBE_TIMEOUT $probe_cmd_args
    # User added code — BEGIN vvvvvvvvvvvvvvv
    # User added code — END ^^^^^^^^^^^^^^^
    # We were not supplied with a probe command. We will use the
    # simple_probe that comes bundled as an utility.
    hatimerun -t $PROBE_TIMEOUT $RT_BASEDIR/simple_probe
    # User added code — BEGIN vvvvvvvvvvvvvvv
    # User added code — END ^^^^^^^^^^^^^^^
  10. Save and close the probe script.

Where to go next

Running Infrastructure Management in high-availability cluster mode

Was this page helpful? Yes No Submitting... Thank you