Forum Discussion
irule Troubleshooting:
Hi Nathan, thanks for your suggestion. We are currently working with this:
when CLIENT_ACCEPTED {
set def_pool [LB::server pool]
log local0. "def_pool is [LB::server pool]"
}
when HTTP_REQUEST {
log local0. "Incoming URI = [HTTP::uri]"
if { [active_members [LB::server pool]] < 1 } {
if { [active_members pool_wwbtest_wartung] > 0 } {
set members [active_members -list pool_wwbtest_wartung]
log local0. "Active members in pool_wwbtest_wartung are: $members"
set mypick [LB::select]
log local0. "The LB choice is: $mypick"
set newuri [string map {/wartung.html/ /} [HTTP::uri]]
log local0. "The new URI is = $newuri"
HTTP::uri $newuri
eval "GET [HTTP::uri $newuri] HTTP/1.1\r\nHost: $mypick\r\n\r\n"
log local0. "[HTTP::uri] [LB::server addr]"
pool pool_wwbtest_wartung
} elseif { [active_members pool_wwbtest_sorry] > 0 } {
set members [active_members -list pool_wwbtest_sorry]
log local0. "Active members in pool_wwbtest_sorry are: $members"
pool pool_wwbtest_sorry
set mypick [LB::select]
log local0. "The LB choice is: $mypick"
set newuri [string map {/sorry.html/ /} [HTTP::uri]]
log local0. "The new URI is = $newuri"
HTTP::uri $newuri
eval "GET [HTTP::uri $newuri] HTTP/1.1\r\nHost: $mypick\r\n\r\n"
log local0. "[HTTP::uri] [LB::server addr]"
} else {
HTTP::respond 200 content "Lieber Kunde,\r\ndie Seite befindet sich aktuell in der Wartung.\r\n\r\nDear Customer,\r\nthis site is down for maintenance. We are sorry for the inconvience.\r\n" noserver connection close
}
}
}
We've disabled members from the default pool and brought up 2 Members in the pool_wwbtest_wartung. the irule triggered correctly jumping in the "if" part, but then failed with this log message:
Feb 26 08:46:45 f5 info tmm[16796]: Rule /Common/rule_wwbtest_error_pages : Incoming URI = /
Feb 26 08:46:45 f5 info tmm[16796]: Rule /Common/rule_wwbtest_error_pages : Active members in pool_wwbtest_wartung are: {xxx.xxx.xxx.x 1080} {yyy.yyy.yyy.y 1080}
Feb 26 08:46:45 f5 err tmm[16796]: 01220001:3: TCL error: /Common/rule_wwbtest_error_pages - Prerequisite operation not in progress (line 7) (line 7) invoked from within "LB::select"
Do you have another idea what might be the problem? 🙂
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