Forum Discussion
TWSS_18275
Nimbostratus
Jun 04, 2008Problem with Switch
We are attempting to setup an iRule that will use a different pool based on the uri string. The problem we are having seems to be "sticky" pools. Here's the iRule:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/path/*" {
persist none
log local0. "PWR -- old pool: '[LB::server pool]'"
pool pool_imagesrv
log local0. "PWR -- new pool: '[LB::server pool]'"
}
default {
persist none
log local0. "DEFAULT -- old pool: '[LB::server pool]'"
pool pool_test
log local0. "DEFAULT -- new pool: '[LB::server pool]'"
}
}
}
and here's a snapshot of the logfile:
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : PWR -- old pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : PWR -- new pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_imagesrv'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_imagesrv'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_test'
Jun 4 08:31:47 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_test'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : PWR -- old pool: 'pool_test'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : PWR -- new pool: 'pool_test'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : PWR -- old pool: 'pool_imagesrv'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : PWR -- new pool: 'pool_imagesrv'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_imagesrv'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_imagesrv'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : DEFAULT -- old pool: 'pool_test'
Jun 4 08:31:48 tmm tmm[1153]: Rule test_irule : DEFAULT -- new pool: 'pool_test'
If you look, it appears that a request has to happens twice for a uri string before the pool gets change. Not sure what the cause is, any ideas?
- hoolio
Cirrostratus
Deb added a helpful post on OneConnect which explains the issue you're seeing: - TWSS_18275
Nimbostratus
OneConnect worked.
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