Highlighted

Triggers - how to set a variable inside a script with the Cluster command result

HI,
I am using triggers to manage links between "Service Groups". I would like to have a bidirectionnal dependencies between Parent & Child . it means :
- if the parent fails over, the child fails over as well.
- if the child fails over, then the parent must fail over as well.
The child SG is started using a postonline Trigger configured at the Parent SG..

I would like to set a variable in the "resstatechange" trigger which is populated with the result of the "hagrp -state sg", but each time I tested it, the variable is empty . In perl, it should be something like "my $var = `system("hagrp -state sg -sys nodex")`.
I am not sure of the syntax so if someone could hemp me?
Is there a way to set a variable which could be used by all the triggers ?

As I didnt find a solution for the problem described above, I create a shell script I call from the trigger, but it seems it is not called... as none of the actions set inside are executed. The Shell script is called as follow:
SYSTEM("/opt/VRTSvcs/bin/triggers/billingAPPsg/ResStateChange.sh $ARGV[0] $ARGV[1] $ARGV[2] $ARGV[3]");
if someone has a huge experience with triggers, I would appreciate.

Thanks for your cooperation
Regards
Hubert

1 Reply
Highlighted

Re: Triggers - how to set a variable inside a script with the Cluster command result

Hello,

You should use VCS Global Service Group functionality which is developped and fully tested "to enable wide-area failover."