- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Package Halt Script problems
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2005 10:56 PM
01-03-2005 10:56 PM
Package Halt Script problems
When a packaged is halted on a node, SG fires a SIGTERM at the services to advise them that they are to shutdown.
I have a package/service that suffere when this happens. The service receives the SIGTERM, and cascades it down to the processes that the service started, terminating them before the service can shut them down gracefully.
I've tried using "trap" to catch the SIGTERM, but have not had any joy.
Can anyone advise?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2005 11:28 PM
01-03-2005 11:28 PM
Re: Package Halt Script problems
What method are you using to stop and start your service ? Do you let service guard stop and start the 'actual' service via the SERVICE_NAME and customer_defined_run_cmds or are you specify a path to a run script which looks after the monitoring and start/shutdown of the service ?
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2005 03:22 AM
01-04-2005 03:22 AM
Re: Package Halt Script problems
SERVICE_CMD[4]="/etc/cmcluster/autosys/autosys.sh start"
There are no customer defined run commands, but the are customer defined halt commands, e..g
/etc/cmcluster/autosys/autosys.sh halt
The start command starts the required processes and then monitors them, if any fail, the script exits, which MCSG detects and restarts the service script as appropriate.
The customer halt commands stop these processes gracefully, unfortunately the SIGTERM is getting through that MCSG sends when the package needs to halted for whatever reason. Ideally I need to stop that SIGTERM from cascading.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2005 01:47 AM
01-06-2005 01:47 AM
Re: Package Halt Script problems
halt_services
customer_defined_halt_cmds
Note that the SERVICEs are halted prior to performing the customer_defined_halt_cmds. This probably explains why your service is being terminated prematurely before the ...halt_cmds has a chance to do it the way you like. Your monitor script should take this into account.
-StephenD.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2005 01:55 AM
01-06-2005 01:55 AM
Re: Package Halt Script problems
You should add a function to your autosys.sh script for monitoring. This can be as simple as sending a kill -0 every few minutes. If you get a nonzero return code, then fail the monitor. Let's call this function monitor
Then your SERVICE should be autosys.sh monitor.
In customer defined run commands, you would have autosys.sh start
In customer defined halt commands, you would have autosys.sh halt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2005 04:38 AM
01-06-2005 04:38 AM
Re: Package Halt Script problems
You need to change this and have the applications started using the user defined run commands function.
If you wish to have a SERVICE monitoring these processes, then you need a further section in your script that you call with a different keyword from stop and start, like monitor, and then use your script with the monitor keyword in your SERVICE command line.
I suggest a good read through the Managing Serviceguard manual at http://docs.hp.com/en/ha may also give you assistance here.