pause between one resource and another
Hey All,
I am looking for a solution to the following problem.
I have a group conrolling Sybase dataserver instance which starts resources in the following order
1) disk group
2) ip and volumes
3) mount points
4) dataserver
5) backupserver
Thing is that the Sybase interfaces file say to Sybase to start the listener on a WLB address. This WLB address/url is dynamic and can resolve to prod or cob IP depending which is is up. Once IP is brought up online F5 Load Balancers set DNS to resolve the WLB address to the correct IP. This allows us to handle COB scenarios in a transparent way from the connectivity point of view. Load Balancers however takes few seconds to pick up the IP change so if dataserver Sybase resource starts onlining the Sybase instance before the WLB url resolves the start of the dataserver will fail. Hence I am looking for a way to tell VCS to wait with starting dataserver until WLB starts resolving, some sort of a condition. Any ideas? So far I was thinking of a Application type of a resource. I wrote a perl script that verifies if the WLB address already resolves to the IP from the same subnet and I can easily use it for StartProgram and StopProgram. Problem is that I have no way to actually offline the resource cause as such it is only a monitor porgram that makes sure WLB address resolves to the correct IP. So what I am really looking for is some sort of a MonitorOnly type of a resource....
Any clues much appreciated
Wojtek
Wojtek,
Create a StartProgram script which loops and sleeps 5 seconds, until the WLB address resolves. Then, in your StartProgram script, touch a lockfile (in /var/run, if on Solaris) and exit. Its a good idea to touch a file in a directory where it will get wiped away when a reboot occurs. Make the lockfile permissions such that only root can remove it.
Create a MonitorProgram script which checks for the lockfile. If the lockfile exists, exit with 110. If it doesn't exist, exit with 100.
Create a StopProgram script which remove the lockfile. And the CleanProgram script will also remove the lockfile, probably with a -f to force the remove.
With these scripts, your resource can go online and offline, and it will give you the results you want.
Set the OnlineTimeout attribute of the Application Agent to a high value, so that your resource has plenty of time to wait until the WLB address resolves, and your resource can go online.
You'll need to copy your scripts to all hosts in the cluster. Create a directory called something like /opt/VRTSvcs/bin/WlbWait, and put the scripts in the directory.
-John