Forum Discussion

hoolio's avatar
hoolio
Icon for Cirrostratus rankCirrostratus
Nov 13, 2009

v10 session command in RULE_INIT?

Hi,

 

 

In v10 it looks like the session table was untied from the VIPs/pools:

 

 

 

http://devcentral.f5.com/wiki/default.aspx/iRules/session

 

 

Starting in BIG-IP version 10, the session table is a simple, global key/value table. Although the syntax is the same (for compatibility with existing iRules), the specifier is ignored in version 10, as are the 'any virtual' and related specifiers.

 

 

 

 

So this seems like an ideal option for replacing non-static global variables from v9 with something that is CMP compatible in v10. However, it's not possible to use the session command in the RULE_INIT event. So you can't initialize session table values. If there isn't a need for a connection to tie the session data to, why can't the session command be used in RULE_INIT?

 

 

I tried to force it, but got a runtime TCL error:

 

 

Nov 13 19:06:24 local/tmm1 err tmm1[2565]: 01220001:3: TCL error: session_rule - Error: No connection established session needs an established connection! (line 1) invoked from within "session add uie key_name key_value" ("eval" body line 1) invoked from within "eval $session_cmd"

 

 

I suppose a less than ideal workaround would be to read a static variable or datagroup entry to see if a session table entry should be reset or created in CLIENT_ACCEPTED (like Deb suggested in this post
No RepliesBe the first to reply