Operating System - HP-UX
1832979 Members
3524 Online
110048 Solutions
New Discussion

Re: Add Service to a package.

 
chapaya_1
Frequent Advisor

Add Service to a package.

Hi ,

I need to add service to a package .
How do i do it ?
Regarding to roll back scenario , what is the best way to return back ?

BYE
4 REPLIES 4
steven Burgess_2
Honored Contributor

Re: Add Service to a package.

Hello

Are you talking about a new application to a currently configured service guard package or a new package altogether ?

Steve
take your time and think things through
Bernhard Mueller
Honored Contributor

Re: Add Service to a package.

To roll back, keep a copy of your package config file and package control script.

To add a service you need to halt the package, add the SERVICE_NAME to config file. Then add the same SERVICE_NAME to the package script, add the SERVICE_CMD (typically a monitoring script), and if desired the SERVICE_RESTART option (e.g. -r 2 to try 2 restarts, or -R to restart infinitely).

then run cmcheckconf -P

if this is fine run cmapplyconf -P

To roll back copy back your config and control files for the package and use the same cmcheckconf & cmapplyconf commands.

Regards,
Bernhard
Stephen Doud
Honored Contributor

Re: Add Service to a package.

To prepare for rollback if necessary:
1) copy the package configuration file and package control script and cluster binary file (/etc/cmcluster/cmclconfig) for restore if needed.

To add a service to a package...
2) the following line must be added to the package configuration file (example name: pkg.config):
SERVICE_NAME

3) the following lines must be added to the package control script (example name: pkg.cntl:

SERVICE_NAME[0]=""
SERVICE_CMD[0]="SERVICE_RESTART[0]=""

4) copy the package control script to the other adoptive node(s)

5) perform "cmapplyconf -f -P pkg.config"
(cmapplyconf will update the cluster binary if the package passes the built-in cmcheckconf).

To rollback if necessary:

6) cmhaltpkg

7) copy cmclconfig.archive cmclconfig

8) copy pkg.cntl.archive pkg.cntl (on all adoptive nodes)

9) cmrunpkg

10) cp pkg.config.archive pkg.config

-StephenD.

Geoff Wild
Honored Contributor

Re: Add Service to a package.

Stephen has it.

Just a FYI, this is a great doc on "Managing MC/ServiceGuard":

http://docs.hp.com/hpux/onlinedocs/B3936-90079/B3936-90079.html


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.