Can we put any time delay between Resources offline
Created: 14 Dec 2012 | 7 comments
Environment
OS = Solaris 10
HA/VCS = 6.0
Cluster Nodes = Two nodes
There are two resources in my Service Group. Application Resource is Parent and Mount Resource is chlid. I want when my Application Resource gets stop when offline, it takes a calculated time of delay before unmount the SAN Disk/LUN
example
Application Resource
|
| (After Application Resource Offline there is suppose 30 seconds delay before executing the unmount)
|
Mount Resource
Discussion Filed Under:
Comments 7 Comments • Jump to latest comment
Easiest way is to just put "sleep 30" in your "StopProgram". If the StopProgram is a binary or you don't want to change it, then use a wrapper script - example:
And then use "app_wrapper.sh" as your StopProgram (you can pass arguments to app_wrapper.sh like the instance of the application if you have mulitple resources, so you only need one wrapper).
A better solution is to loop and check whatever you need to determine your app is completely down and then exit.
Mike
UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows
If this post has helped you, please vote or mark as solution
Yes my stop program is a binary.
like my start program is "Application.sh start"
stop program is "Application.sh stop"
=====================
( Is not any attribute which we can use to do this ? )
Any comment will be appreciated. Mark as Solution if your query is resolved
__________________
Thanks in Advance
Zahid Haseeb
zahidhaseeb.wordpress.com
A ".sh" extension usually means this is a shell script, not a binary, so this being the case you could just edit Application.sh to add "sleep 30" to the end, else just use wrapper:
UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows
If this post has helped you, please vote or mark as solution
Thanks Mike for your kind input. But is not any attribute which can add a delay between Resources while offline ?
Any comment will be appreciated. Mark as Solution if your query is resolved
__________________
Thanks in Advance
Zahid Haseeb
zahidhaseeb.wordpress.com
I don't believe so - there is the OfflineWaitLimit, but this calls the monitor during the wait so if the monitor reports offline, when the App actually needs more time to stop cleanly, then this will not work. But if the monitor reports the App is online during this 30 seconds after offline completes, you could use this.
Some agents have delay attributes built in like the GenericService agent on Windows which has a DelayAfterOffline attribute.
If you are writing your own agent from scratch, rather than using Application agent, then this functionality is built-in by using the return code as the delay after running offline (see VCS Agent Developer’s Guide) is defined as:
UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows
If this post has helped you, please vote or mark as solution
What is offline timeout ?
Any comment will be appreciated. Mark as Solution if your query is resolved
__________________
Thanks in Advance
Zahid Haseeb
zahidhaseeb.wordpress.com
The amount of time you allow for the offline function to finish - see definition is VCS admin guide:
Mike
UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows
If this post has helped you, please vote or mark as solution
Would you like to reply?
Login or Register to post your comment.