cancel
Showing results for 
Search instead for 
Did you mean: 

Triggers

rob11g
Not applicable

Hello All,
I am a newbie to this forum, I am looking for some assistance.  I have been assigned the task of testing serveral triggers and I have not been successful.
I have been all over the internet looking for answers and I came across this forum.

Currently I am trying to test the following triggers:
resadminwait
violation
sysoffline
injeopardy

I have spend a couple of days trying different things and nothing.  Any assitance would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Wally_Heim
Level 6
Employee

Hi Rob11g,

Here are some basic steps to test these triggers assuming that you have put your code into them and have copied them to correct place.

violation

1.  create a test service group using a FileOnOff resource.  Configure it to put a file (test.txt) in a specific location on each server (on windows I would configure it to go to c:\test.txt.)

2.  Online the service group on one node.

3.  On the node that is not running the service group, create the file in the location specified in the resource.  This will cause the FileOnOff resource to be probed as online on both servers which will cause the violation.pl trigger to be fired.

sysoffline

1.  With all nodes running in a multi node cluster, shutdown one node.

2.  This should cause the sysoffline.pl trigger to be fired on the remaining nodes that are online.  (Again the script needs to be in the correct place on the server for this to work.)

Injeopardy

1.  With all nodes running and all heartbeats up, pull the network cable for the heartbeats until you get to situation where there is only one heartbeat link still available (up.)

2.  This should cause the injeopardy trigger to be fired for at least one node.  Although it might not fire for all nodes.

 

resadminwait - I'm not sure that I have ever had to test this one in my 10 years of supporting VCS.  I'm not sure how to put a resource in an adminwait state without doing some research on this one.  Maybe someone else will be able to help with this one.

 

If your triggers are not doing what you want them to do then try to do something simple.  What I have customers try on windows is to create a simple file in the script (again c:\test.txt) if this works then the script is running fine it is the commands that they are running that are having problems.  What I find with windows customers is that they are trying to do something that the local system account (the account that runs the triggers) does not have permission/rights to do.  There are ways around this but I don't really like them because they require a user/password to be entered into the script in plain text format.

 

I hope this helps.

Thanks

Wally

View solution in original post

3 REPLIES 3

Ed_Cook
Level 3
Employee Certified

Hello,

Could you please post a copy of your trigger script,  along with a brief description of what you would like the scripts to do.


Thank You,

Ed Cook

vcs_man
Level 4
Employee Accredited Certified
Hi Rob11g,

I hope you have copied the mentioned  triggers from sample_triggers(/opt/VRTSvcs/bin/sample_triggers) to /opt/VRTSvcs/bin/triggers directory in order to execute the trigger from VCS.

As suggested by ED earlier, we would like to know what commands you are trying to use in the trigger script.

Thanks,
Mandar




Wally_Heim
Level 6
Employee

Hi Rob11g,

Here are some basic steps to test these triggers assuming that you have put your code into them and have copied them to correct place.

violation

1.  create a test service group using a FileOnOff resource.  Configure it to put a file (test.txt) in a specific location on each server (on windows I would configure it to go to c:\test.txt.)

2.  Online the service group on one node.

3.  On the node that is not running the service group, create the file in the location specified in the resource.  This will cause the FileOnOff resource to be probed as online on both servers which will cause the violation.pl trigger to be fired.

sysoffline

1.  With all nodes running in a multi node cluster, shutdown one node.

2.  This should cause the sysoffline.pl trigger to be fired on the remaining nodes that are online.  (Again the script needs to be in the correct place on the server for this to work.)

Injeopardy

1.  With all nodes running and all heartbeats up, pull the network cable for the heartbeats until you get to situation where there is only one heartbeat link still available (up.)

2.  This should cause the injeopardy trigger to be fired for at least one node.  Although it might not fire for all nodes.

 

resadminwait - I'm not sure that I have ever had to test this one in my 10 years of supporting VCS.  I'm not sure how to put a resource in an adminwait state without doing some research on this one.  Maybe someone else will be able to help with this one.

 

If your triggers are not doing what you want them to do then try to do something simple.  What I have customers try on windows is to create a simple file in the script (again c:\test.txt) if this works then the script is running fine it is the commands that they are running that are having problems.  What I find with windows customers is that they are trying to do something that the local system account (the account that runs the triggers) does not have permission/rights to do.  There are ways around this but I don't really like them because they require a user/password to be entered into the script in plain text format.

 

I hope this helps.

Thanks

Wally