Operating System - HP-UX
1845503 Members
3250 Online
110244 Solutions
New Discussion

Proper way to stop a hung cmrunpkg/cmhaltpkg

 
SOLVED
Go to solution
Victor Sien
Advisor

Proper way to stop a hung cmrunpkg/cmhaltpkg

Hi,

What is the proper way to stop a cmrunpkg/cmhaltpkg that's stuck due to application start-up issues? the database has problems (and that has to be fixed) but cmrunpkg is waiting for the app part (which it is not getting). What is the proper way to stop cmrunpkg/cmhaltpkg? I just need it stopped so we can proceed with testing. I've tried killing the startup script in the past but that causes a panic. Any ideas?

Thanks.
8 REPLIES 8
Murat SULUHAN
Honored Contributor

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

Hi Victor

You should modify customer defined startup and halt functions in your package control script.
The package control script located under /etc/cmcluster directory or sometimes /etc/cmluster/ it depends on your package creation process

These scripts run when you halt or run package

Best Regards
Murat
Murat Suluhan
Kevin Wright
Honored Contributor
Solution

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

Configure a timeout value for your start/stop scripts.
Victor Sien
Advisor

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

Hi Kevin,

Thanks for the input.. So if I use NO_TIMEOUT, it will wait forever?

Also, if I kill the application script, should it always cause a panic?

A. Clay Stephenson
Acclaimed Contributor

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

Yes, NO_TIMEOUT (the default) will wait forever.

Killing an application script MAY cause a TOC and that is actually a good thing. You should remember that the overarching design princple behind SG is not high-availability but rather no data corruption. What is avoided at all costs is the case where two nodes are trying to access the same data --- unless the package is specifically designed for that.
If it ain't broke, I can fix that.
Devender Khatana
Honored Contributor

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

Hi,

It seems you know the sulution but is still trying to avaoid that. Panic is the only option here either by killing the application script or cmcld daemon.

For testing normally one should be executing the application scripts manually rather then getting these run through SG. Once the script starts working fine then it should be checked with SG automation.

HTH,
Devender
Impossible itself mentions "I m possible"
Matti_Kurkela
Honored Contributor

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

Before killing the stuck application, try running "cmmodpkg -d" for your package. This disarms ServiceGuard's failover functions... if this does not prevent the panic, nothing will.

MK
MK
Victor Sien
Advisor

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

Thanks everyone for the replies. The scripts are actually fine but the database has issues lately that caused the scripts to fail recently (im using sgeSAP toolkit). I killed the script, but i was just wondering there are other ways to do it without causing TOC and wait for reboots to complete before proceeding with tests.

anyways, this looks good now. I'll benchmark script execution time and put a timeout.

Thanks!
Victor Sien
Advisor

Re: Proper way to stop a hung cmrunpkg/cmhaltpkg

closing this thread. thanks.