I have testing this irule so i have three errors:
What is the probléme, i can't create a variable in a irule? Or its not the right method?
the error:
01070151:3: Rule [/Common/irule_TEST] error:
line 1: [command is not valid in the current scope] [set poolname "TEST"]
line 2: [command is not valid in the current scope] [set fqdn "TEST.com"]
line 3: [command is not valid in the current scope] [set NbNode 2]
line 16: [command is not valid in current event context (HTTP_RESPONSE)][LB::reselect pool $poolname]
the script:
set poolname "TEST"
set fqdn "TEST.com"
set NbNode 2
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals $fqdn }
{
pool $poolname
}
}
when HTTP_RESPONSE {
if { ([HTTP::status] == 500) or ([HTTP::status] == 404) or ([HTTP::status] == 503) } {
if { [active_members $poolname] > $NbNode } {
LB::down
LB::reselect pool $poolname
}
else {
LB::reselect pool $poolname
}
}
}