All, I upgraded our F5 LTM’s from 9.x to 11.3. Had an existing irule to set cookie domain, but it doesn’t seem to be working. Is my syntax correct for 11.3? I knew about changing the data groups by removing $:: Thanks, Bryce
when LB_SELECTED { get the pool name used for this request log local0. “my_pool is [LB::server pool]” set my_pool [LB::server pool] } when HTTP_RESPONSE {
Check if the persistence cookie exists in the response if {[HTTP::cookie exists “BIGipServer$my_pool”]} { set the domain attribute on the persistence cookie HTTP::cookie domain “BIGipServer$my_pool” “.foo.com” if {[HTTP::cookie exists “JSESSIONID”]} { HTTP::cookie domain “JSESSIONID” “.foo.com” } } }
Your iRule is good. On a v11 system with partitions, the [LB::server pool] command will return the partition and pool.
/Common/local-pool
You just need to make a minor change:
when LB_SELECTED {
get the pool name used for this request
set my_pool [string map {"/Common/" ""} [LB::server pool]]
log local0. "my_pool $my_pool"
}
when HTTP_RESPONSE {
Check if the persistence cookie exists in the response
if { [HTTP::cookie exists "BIGipServer$my_pool"] } {
set the domain attribute on the persistence cookie
HTTP::cookie domain "BIGipServer$my_pool" "foo.com"
}
if { [HTTP::cookie exists "JSESSIONID"] } {
HTTP::cookie domain "JSESSIONID" "foo.com"
}
}
Kevin, Working perfectly now! Thanks for the quick response! Love this site. Bryce