Forum Discussion

Kent_Perrier_52's avatar
Kent_Perrier_52
Icon for Nimbostratus rankNimbostratus
Sep 20, 2010

How to code around the bug in sol11651

I got bit by the bug in listed in https://support.f5.com/kb/en-us/solutions/public/11000/600/sol11651.html. I did not write this iRule, and no one fessing up to writing it, so here is my iRule:

 

 

when LB_FAILED {
  if { [active_members [LB::server pool]] != 0 } {
  } else {
    if { [HTTP::uri] starts_with "/gwtwb" } {
      HTTP::fallback "http://someserver.mysite.com/F5/GenericErrorPage.htm
l"
    } else {
      HTTP::respond 400
    }
  }
}

 

 

I am not sure why the initial if conditional is in there. All we need the iRule to do is send interactive users (those accessing the gwtwb context) to a user friendly error page if all pool members are down, and send all other contexts an HTTP error code 400. As per the knowledge base article, F5 support does think this is what caused my LTM to crash.

 

 

Any ideas how to code around this bug?

 

2 Replies

  • How bout this:

    
    when LB_FAILED {
    if { [HTTP::uri] starts_with "/gwtwb" } {
    HTTP::fallback "http://someserver.mysite.com/F5/GenericErrorPage.htm" }
    else { HTTP::respond 400 } }
    
  • After reading the wiki for LB_FAILEd, it doesn't appear that HTTP::uri is a valid command.

    http://devcentral.f5.com/wiki/default.aspx/iRules/lb_failed

    You might have to set a variable from another event if it doesn't compile.

    Something like this:

    
    when HTTP_REQUEST {
    if { [HTTP::uri] starts_with "/gwtwb" } {
    set gwtwb 1 }}
    
    when LB_FAILED {
    if { $gwtwb eq 1 } {
    HTTP::fallback "http://someserver.mysite.com/F5/GenericErrorPage.htm" }
    else { HTTP::respond 400 } }