Forum Discussion
Big-IP Next 20.2.0-2.375.1+0.0.43 iRule count problem
I have very simple iRule to show the problem:
when HTTP_REQUEST {
set Client_IP [IP::client_addr]
if { ($Client_IP starts_with "x.x.x.x") && ([HTTP::uri] equals "/seed") } {
table set -subtable TABLE "key1" "value1" 30
table set -subtable TABLE "key2" "value2" 15
table set -subtable TABLE "key3" "value3" 45
HTTP::respond 200 content "Done"
TCP::close
return
}
set key_value "key1"
set key_value2 "key2"
set key_value3 "key3"
set count [table keys -subtable TABLE -count]
HTTP::respond 200 content "
Remaining timeout / defined timeout for ${key_value} => [table lookup -notouch -subtable TABLE ${key_value}] [table timeout -subtable TABLE -remaining ${key_value}]/[table timeout -subtable TABLE ${key_value}]
Remaining timeout / defined timeout for ${key_value2} => [table lookup -notouch -subtable TABLE ${key_value2}] [table timeout -subtable TABLE -remaining ${key_value2}]/[table timeout -subtable TABLE ${key_value2}]
Remaining timeout / defined timeout for ${key_value3} => [table lookup -notouch -subtable TABLE ${key_value3}] [table timeout -subtable TABLE -remaining ${key_value3}]/[table timeout -subtable TABLE ${key_value3}]
Count TABLE ${count}"
}
It looks like table -keys -subtable <tablename> -count don't work properly:
Remaining timeout / defined timeout for key1 => value1 27/30
Remaining timeout / defined timeout for key2 => value2 12/15
Remaining timeout / defined timeout for key3 => value3 42/45
Count TABLE 0
My expected output would be 3 (as it is not timeouted), not 0.
Can someone check if I am correct? Or tell me how I can count not expired entries in table.
- Lucas_ThompsonEmployee
This does seem like a defect, thanks for the detailed writeup. It reproduces correctly: count is correct in BIG-IP 17.x, but 0 in BIG-IP Next 20.2.
It's now logged as defect ID 1584741.
- gwieczorekAltostratus
Any workaround possible?
- Lucas_ThompsonEmployee
Sorry I can't think of any. We'll have to wait until the engineering team has had a chance to analyze the issue.
Feel free to open a support ticket if you need a fast or assured response, and mention that ID number and request about possible workarounds.
- gwieczorekAltostratus
I have open case. Date opened: May 06, 2024, 12:01 PM
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