Hey Guys, Historically we have provided our users with the below iRule to through up a maintenance page when the pool/members fail. We have been caught out just recently when a dozen sites got updated pools but due to user/admin error no one updated the maintenance page iRule. The servers in the old pools got decommissioned and an error page was thrown.
when HTTP_REQUEST {
if {[active_members Pool-old-pool-name] < 1 } {
HTTP::respond 200 content "
I have been investigating a better method to do this without direct referencing the pool name. I was looking at and testing in our PreProduction enviornment the event LB_FAILED but ran into truncated responses and was given this reference article via F5 support ( 404 Page not found | BIG-IP Documentation ). So that means that avenue is closed.
What is the best practise for error pages without directly refercing the pool name.
If you want to reference the default pool that is associated with the irule on a VS, then you can just use [LB::server pool]
when HTTP_REQUEST {
if {[active_members [LB::server pool]] < 1 } {
HTTP::respond 200 content
}
}
If you want to send the connection to an alternate pool when the default pool is down, but not use a pool name, you can use an HTTP::redirect and just manage the maintenance pool via it’s own VS and Dns entry. You could also setup a global static variable that all irules can access on an LTM system with a value of the alternate pool
I was looking at and testing in our PreProduction enviornment the event LB_FAILED but ran into truncated responses and was given this reference article via F5 support ( 404 Page not found | BIG-IP Documentation ). So that means that avenue is closed.
isn’t the workaround usable?
Disabled the pool member and I sometimes get the error message, sometimes not, sometimes the error message is inserted into the text boxes on the screen.