Forum Discussion
whisperer
MVP
Apr 25, 2013Virtual Statement String Processing
Having some issues with the 'virtual' statement within a v9 iRule. The code basically includes the following pertinent statements:
when HTTP_REQUEST {
set app_pool [LB::server pool]
virtual "${app_pool}_SOME_STRING"
unset app_pool
}
The error then seen in logs is the following:
TCL error:
HTTP_REQUEST - Failed listener_lookip: virtual line 1 invoked from within virtual ${app_pool}_SOME_STRING
In this case, lets assume the following:
Pool Name: "my_app"
VIP: "my_app_SOME_STRING"
Thusly, the Pools and VIPs exist....
Perhaps I have either (a) wrong syntax somewhere or (b) the 'app_pool' variable is not being set properly?
3 Replies
- Kevin_Stewart
Employee
Two things:
1. Please add a log statement that shows the value of app_pool.
2. Which version of 9.x? The ability to direct traffic with the virtual command didn't exist before 9.4.0. - LTM Version is 9.4.7.
If 'app_pool' has no set value, shouldnt the variable still be processed w/ potentially a null string used as its value? It looks like the variable is not even being parsed. - Kevin_Stewart
Employee
Try this and review/report your findings:when HTTP_REQUEST { set app_pool [LB::server pool] log local0. "app_pool = $app_pool" log local0. "virtual = ${app_pool}_SOME_STRING" virtual "${app_pool}_SOME_STRING" unset app_pool }
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