Forum Discussion

bazi's avatar
bazi
Level 3
13 years ago

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 volum...
  • jstucki's avatar
    13 years ago

    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