Forum Discussion
hooleylist
Dec 12, 2007Cirrostratus
Unruley suggested this a few times starting a while back:
http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&forumid=5&postid=2066
You can try the following modifications to your rule to save the default pool and reuse it, thus generalizing your rule to be used with many virtuals.
rule cookie_lbsid {
when CLIENT_ACCEPTED {
set defpool [LB::server pool]
}
...
http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&forumid=5&postid=7275
1) 9.1 does support the [LB::server pool] command which will return the currently selected pool. You do not have to wait until LB_SELECTED to get the currently selected pool. Thus something like this will return the original default pool on the virtual server:
when CLIENT_ACCEPTED {
if {not [info exists default_pool]} {
set default_pool [LB::server pool]
}
}
I think a lot of people have been using it since then to get the default pool of the VIP before any changes to the pool have been made on the connection.
Aaron