Running StartProgram and StopProgram manually
I am writing a script that will allow members of an application development team to restart/stop/start their applications which run under VCS without triggering a failover or fault within the cluster. I'm doing this by simply freezing the service group and then calling StartProgram and StopProgram as necessary. I'm parsing hares -display $MYRESOURCE -attribute StartProgram or StopProgram to get this information.
<pre>
# hares -display myresource -attribute StartProgram
#Resource Attribute System Value
myresource StartProgram global /apps/software/javaservlet/myresource/bin/servlet.sh start
</pre>
The issue I'm facing is that parsing this output for the Value information isn't always resulting in a clean command to be run. So I'm wondering if there is an hares command I can use to call the Start or Stop programs directly, even while the service group is frozen? I looked at hares -action but I'm not sure if that's what I want. Any help or suggestions are appreciated.
Thanks
Comments 2 Comments • Jump to latest comment
Most likely you seem to be using Application Agent. If you have MonitorProgram specified as the monitoring method for your VCS resource, then you may want to use the Intentional Offline feature that is available from VCS 5.0MP3 onwards. If you modify your MonitorProgram to return Intentional Offline return code (i.e. 200) then the resource would not be faulted in VCS. Instead it will be marked as Offline and would not trigger any failover or fault.
If you just want to offline a resource without causing a failover, then you can offline resource in VCS by just using "hares -offline res_name -sys system" and there is no need to freeze. If you can't do this for some reason, then you could try using "hares -value" as this will return just your attribute so will be easier to parse.
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.