Forum Discussion
U_franco_117956
Nimbostratus
Oct 02, 2013TCL error - no such pool
Hi.
We are trying to use a modified irule documented in devcentral to encrypt and maintain cookie persistence across Pools and Services https://devcentral.f5.com/wiki/iRules.Cookie_Encryption_ac...
U_franco_117956
Nimbostratus
Oct 02, 2013Ops!! I hope now irule will be more readable
when HTTP_REQUEST {
If the cookie exists, connect to the IP spACCMfied in the cookie
if { [HTTP::cookie exists "ACCM"] } {
set need_cookie 0
set decrypted [HTTP::cookie decrypt "ACCM" "skyisblue"]
if { ($decrypted ne "") } {
log local0. "REQUEST - El host [HTTP::host] se dirige al pool member $decrypted"
set persist_node [HTTP::cookie "ACCM"]
log local0. "El pool del miembro es: [LB::server pool]"
foreach member [active_members -list [LB::server pool]] {
set node [lindex $member 0]
if { $node eq $persist_node } {
node $persist_node [lindex $member 1]
}
}
}
} else {
set need_cookie 1
}
}
when LB_FAILED {
set need_cookie 1
LB::reselect
}
when HTTP_RESPONSE {
if { $need_cookie } {
HTTP::cookie insert name "ACCM" value [IP::remote_addr] path /
HTTP::cookie encrypt "ACCM" "skyisblue"
HTTP::cookie expires "ACCM" 86400
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects