Forum Discussion
Chris_Day_10331
Nimbostratus
Dec 27, 2005iRules for Individual Testing of Farm Servers
Hello wonderful people at DevCentral!
I have a follow-up to an earlier post I had made “iRule for Server Testing” (http://devcentral.f5.com/default.aspx/Default.aspx?tabid=28&forumid=5&posti...
unRuleY_95363
Jun 06, 2006Historic F5 Account
I'd like to re-iterate some notes about the use of the "catch" command:
First, of all, catch actually evaluates the command, so there is no need to evaluate it again in the if-else body. All catch really does, is catch the return code of what it evaluated.
Second, you should check for a return of != 1 which means not an error, instead of just doing a boolean check as there are other possible non-zero values that don't mean an error occured.
Also, the "node" command won't return an error if the node does not exist. It will only return an error if the node provided is not a properly formatted IP address. Instead, if the node does not exist, you will likely get an LB_FAILED event when the connection fails to connect.
Anyway, using Deb's latest "check if the node is a member of the pool" logic provided in the above post is probably much better way to go anyway. Just thought I'd mention these notes about using the "catch" command.
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