Operating System - HP-UX
1827212 Members
2329 Online
109716 Solutions
New Discussion

Re: Service guard 11.18 with 11.31 OS

 
SOLVED
Go to solution
Muthu Srinivasan
Occasional Advisor

Service guard 11.18 with 11.31 OS

All,

we are going to install two node cluster with hp-ux 11.31 and service guard 11.18.

We are going to have Prod package on one server and Dev package on another server.

We are going to have two application startup files

How to use external script to start the application. Do we have to copy both startup files in cluster config file?

Thanks
Muthukumar
8 REPLIES 8
Murat SULUHAN
Honored Contributor

Re: Service guard 11.18 with 11.31 OS

Hi Muthu

You need to create 2 packages so two package control files therefore both nodes have that control files.

Each control file has 2 special function to start or halt external applications.
Please look at page 289 in the following pdf
http://docs.hp.com/en/B3936-90105/B3936-90105.pdf

My advice is you should write 2 start and stop script for each application to use with root account.
Make sure they are properly works. Just test from UX command line
If they works good add these scripts into the related package control files.

Best Regards
Murat
Murat Suluhan
Aashique
Honored Contributor

Re: Service guard 11.18 with 11.31 OS

Hi,
I think your scenario will be like this:

Prod-package->Node1 (primary)
Prod-package->Node2 (secondary)

Dev-package->Node2 (primary)
Dev-package->Node1 (secondary)

Thanks & Regards
Aashique
Muthu Srinivasan
Occasional Advisor

Re: Service guard 11.18 with 11.31 OS

Hi,

We are running prod package on node A and Dev package on node B.

we are not using package.cntl file in this
cluster.

we used cmmakepkg to create the config file

cmmakepkg -m sg/failover -m sg/filessytem -m sg/volume_grouo /etc/cmcluster/prod/prod.config

prod.config file all have the information without Database startup/shutdown information

Service guard manual says use external scripts for customer defined function for verion 11.18

(Executes any customer-defined run commands (legacy packages
only; see â Adding Customer Defined Functions to the Package
Control Scriptâ on page 383) or external_scripts (modular
packages only; see page 304).


Did any one used external_scripts start the database , Where we have to keep the external_scripts?

Thanks
Muthu
Murat SULUHAN
Honored Contributor

Re: Service guard 11.18 with 11.31 OS

Hi

I always use my scripts stop and start databases or any other application (like tomcat
, oracle ias, weblogic)

You can put start stop scripts into shared directory on diskarray or /etc/cmcluster/ or any directory.

It does not matter where do you want to put.

SG runs start script at the end of the package starting process and runs stop script at the beginning of the package stopping process

Best Regards
Murat
Murat Suluhan
whiteknight
Honored Contributor

Re: Service guard 11.18 with 11.31 OS

Muthu,

What application you are using ?

refer to this
http://docs.hp.com/en/B3936-90117/ch06s03.html?btnNext=next%A0%BB

WK
Problem never ends, you must know how to fix it
Stephen Doud
Honored Contributor
Solution

Re: Service guard 11.18 with 11.31 OS

There are two ways to build a package at A.11.18.

The legacy package format requires the creation of both a package configuration file and a package control script.
Within the package control script are 2 functions from which external scripts can be called; customer_defined_run_cmds and customer_defined_halt_cmds.

The newer format for creating packages is the modular method. This requires just the creation of the package configuration file, using extra options to introduce control-specific parameters into the file.
The parameter that calls external script is

external_script

This parameter is described on page 304 of the latest Managing Serviceguard manual at http://docs.hp.com/en/ha.html#Serviceguard -> http://docs.hp.com/en/B3936-90122/B3936-90122.pdf

The external_script parameter is included if the module sg/external is explicitly requested in the cmmakepkg command.

For novices of the modular package creation, we recommend using the following command to create a fully documented package configuration file that includes all modules:

# cmmakepkg -v 2 -n

Muthu Srinivasan
Occasional Advisor

Re: Service guard 11.18 with 11.31 OS

Stephen and other friends,

Thanks for your help.
we are going to use oracle db (application startup)
my application start script is called start_oracle

I don't think we used sg/external while creating the pakage config file.

do i have to recreate config file or if there is any can we add sg/external using cmmodpkg command?

thanks
Muthu
Stephen Doud
Honored Contributor

Re: Service guard 11.18 with 11.31 OS

cmmodpkg cannot add parameters to a package configuration file. (check the man page)

You can either recreate a new package configuration file and customize it, or use the following command to create a file that contains all of the parameters that are needed for the sg/external module:

# cmmakepkg -v 0 -m sg/external sg_external.config

Then compare the contents of this file to your package configuration file, and transfer in any parameters that are missing to your file and customize them.
Then do a cmapplyconf on the file when the package is not running.