Tal_BenHaim_112
Oct 03, 2006Nimbostratus
LB::reselect - LB_SELECTED event occures twice
Im trying to write a rule that will select the pool member according to a parameter in the query string .
It seems that the LB_SELECTED event occurs twice.
in the first occurence the pool name is: "xxx"
in the second occurence the pool name is: "_tmm_asm_http_pool"
so the i-rule fails...
the i-rule :
when HTTP_REQUEST {
set ip [IP::client_addr]
set uri [HTTP::uri]
set query [HTTP::query]
set f 0
set d 0
if {([IP::addr [IP::client_addr] equals 192.118.92.3])}
{
log local0. "$ip"
}
}
when LB_SELECTED {
set uri [HTTP::uri]
set host [HTTP::host]
set query [HTTP::query]
set s [LB::server]
set pm [string index $query 3]
set pool [LB::server pool]
log local0. "uri: @$uri@ pm: @$pm@"
if { ([IP::addr [IP::client_addr] equals 192.118.92.3]) and ($uri starts_with "/?pm")}
{
set p [LB::server addr]
set pool [LB::server pool]
if { $host starts_with "gt-q" }
{
if { $pm equals "1" }
{
LB::reselect $pool 192.168.152.4
set pool2 [LB::server pool]
log local0. "pool2: @$pool2@"
log local0. "1pm: @$pm@ host:: @$host@ pool addr: @$p@ uri: @$uri@ server: @$s@ query:
@$query@"
}
}
}
}
the output:
Oct 3 15:09:31 tmm tmm[1125]: Rule SelectPool : 192.118.92.3
Oct 3 15:09:31 tmm tmm[1125]: Rule SelectPool : uri: @/?pm=1@ pm: @1@
Oct 3 15:09:31 tmm tmm[1125]: Rule SelectPool : pool2: @xxx@
Oct 3 15:09:31 tmm tmm[1125]: Rule SelectPool : uri: @/?pm=1@ pm: @1@
Oct 3 15:09:31 tmm tmm[1125]: Rule SelectPool : pool2: @_tmm_asm_http_pool@
2) Is the tmm log file maintained by the big-ip?
Is it deleted by the big-ip when it reaches a specific size limit?
Thanks,
Tal