cancel
Showing results for 
Search instead for 
Did you mean: 

Basic idea needed about Preonline trigger script

ajsakthivel
Level 3
Hi Guys,
                     I needed a basic idea on preonline trigger script. How it works ? Where it will be useful ? .

For example : I have 3 service groups on 2 nodes configured under a sinlge cluster (HA setup). one among the resource getting failed, and hence all service groups in primary node is moving to faulting / offline state. But here one among service group , will take for me more than 20 minutes to go offline.

hence i have to make all other service groups to wait until all services group in my primary node to go offline and then failover should be triggered .


Will this is possible by preonline trigger script ? If so can anyone guide me on this .

Please dont point me to any user guides , as i already refered the vcs user guide and didnt get any idea on that .



Thanks,
Sakthi.
2 REPLIES 2

Eric_Gao
Level 4
Hi Sakthi,

first of all, your saying "one among the resource getting failed, and hence all service groups in primary node is moving to faulting / offline state." does confuse me a bit.  My understanding each SG is running and failed over independently, as long as there is no SG dependency or application dependency that out of control of VCS.

The failover is happening in 2 steps,  step1, offline SG on node1,  step2 online SG on the other node.  While the preonline trigger happends just before step2.  From the beginning of step1 up to the very end of step1, preonline is totally not involved, So preonline I believe is not helpful in your case.

To cater your requirement, that when SG1 faulted and was taking offline, hold on the failover of SG2 and SG3,  one of method I can think of is with postoffline to set up on all 3 SGs.  The postoffline will continue to check the SG state of all the other 2 SGs and will not finish until the other 2 SG got offline.  This will prevent SG2, SG3 go to online on the othe node, until SG1 is fully offline.

But one drawback is that it will not prevent SG2,SG3 go to offline on the primary node, thus while SG1 is being taken offline, (which might take 20 mins as you said), during this 20 mins, SG2, SG3 will remain in offline state.

Also pls notes, postoffline is non-configurable trigger, which means after you put the scirpt in, the postonline trigger is enabled automaitcally.

Eric

Gaurav_S
Moderator
Moderator
   VIP    Certified
Hello,

you can find sample triggers under  /opt/VRTSvcs/bin/sample_triggers/  on any VCS server. This is installed by default.

You can have a look to see postoffline /preonline triggers.

Gaurav