Forum Discussion
Table command not working between two different iRules on different VIPs
I am trying to use the table command to pass data between two different iRules but they only seem to be able to see their own table even though the key is the same. IRULE 1 set sess [IP::client_addr] set mydata "testing" table set $sess $mydata
iRule 2 set sess [IP::client_addr] set getdata [table lookup $sess] if {$getdata != ""} { do something here }
However, getdata always comes back empty.
5 Replies
- nitass
Employee
However, getdata always comes back empty.
did you get the data within idle timeout (default is 180 seconds)?
table
https://devcentral.f5.com/wiki/irules.table.ashx - jemster_44692
Nimbostratus
Yes, it was within 1 second.
- nitass
Employee
this is mine.
config root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule80 ltm rule myrule80 { when CLIENT_ACCEPTED { set sess [IP::client_addr] set mydata "testing" table set $sess $mydata log local0. "[virtual name]: table set $sess $mydata" } } root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule81 ltm rule myrule81 { when CLIENT_ACCEPTED { set sess [IP::client_addr] set getdata [table lookup $sess] log local0. "[virtual name]: set getdata \[table lookup $sess\] = [table lookup $sess]" if {$getdata != ""} { do something here } } } test [root@ve11a:Active:In Sync] config tail -f /var/log/ltm May 19 18:33:48 ve11a info tmm[14715]: Rule /Common/myrule80 : /Common/bar80: table set 172.28.24.1 testing May 19 18:33:52 ve11a info tmm[14715]: Rule /Common/myrule81 : /Common/bar81: set getdata [table lookup 172.28.24.1] = testing - Kevin_Stewart
Employee
Is it at all possible that you have a race condition - the possibility that you're trying to read the value before it's been set? Do you have a priority defined in each event declaration? Or do you have the iRules applied in a specific order in the GUI (v11)?
- Georgi__Joe__St
Altostratus
Is that issue solved and how? I have exact same problem at the moment. (11.6.0)
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com