Forum Discussion
Patrick_McGlyn1
Jun 15, 2010Nimbostratus
Application migration iRule
I am trying to write an iRule to migrate applications from an old web farm pool to a new web farm pool. The web servers are setup to run multiple
application instances on the same IP and Port.
F...
Michael_Yates
Jun 15, 2010Nimbostratus
I think that it might be because you are using findclass instead of matchclass.
In your example you are saying:
If the [HTTP::uri] is equal to a value that I have stored in my data group, replace that value with the second data group value. If that value is not equal to "" nothing, then direct traffic to pool "old_server_pool-80.
findclass is best used for a Match and Replace.
Searches a data group list for a member whose key matches the specified string, and if a match is found, returns the data-group member string.
http://devcentral.f5.com/wiki/default.aspx/iRules/findclass.html
Try matchclass:
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] equals $::old_server_pool] } {
pool old_server_pool-80
}
elseif { [matchclass [HTTP::uri] equals $::new_server_pool] } {
pool new_server_pool-8001
}
}
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