Forum Discussion

dlg_23340's avatar
dlg_23340
Icon for Cirrus rankCirrus
Mar 13, 2012

LB::select hangs

With the following irule, LB::select hangs sometimes. Sometimes this works, sometimes it doesn't, and I don't know why.

when HTTP_REQUEST {

pool pool1

log local0. " starting"

log local0. " [LB::select]"

log local0. " server: [LB::server]"

}

When this goes wrong, all I see in the logs is " starting" and the HTTP client just waits for a response.

We're running 10.2.0, are there any known issues in the LB::select code? Am I doing this wrong?

I know you have to 'eval' the output of LB::select to make it do anything, but I'm not even to that point yet - the LB::select call hangs so that there's nothing to eval.

  • do you have any special setting on the virtual server?
  • Could you share a sanitised version of the virtual config ? Which exact version are you running ?

     

     

    regards,

     

    Christian

     

  • ltm virtual demo {

     

    destination 10.10.10.106:http

     

    fallback-persistence source_addr

     

    ip-protocol tcp

     

    mask 255.255.255.255

     

    persist {

     

    cookiepersist {

     

    default yes

     

    }

     

    }

     

    profiles {

     

    http { }

     

    tcp { }

     

    }

     

    rules {

     

    LB_FAILED

     

    lbselectdemo

     

    }

     

    }

     

     

     

    ltm rule LB_FAILED {

     

    when LB_FAILED {

     

    HTTP::redirect http://10.10.10.105/unavailable.php?site=[HTTP::host]

     

    }

     

    }

     

  • oops, the version:

     

     

    Sys::Version

     

    Main Package

     

    Product BIG-IP

     

    Version 10.2.0

     

    Build 1707.0

     

    Edition Final

     

    Date Thu Apr 8 20:50:48 PDT 2010

     

  • c_p_i_o_17707's avatar
    c_p_i_o_17707
    Historic F5 Account
    Do you have a pool associated with the virtual?

     

    Maybe LB::select on an empty pool hangs. This could be a bug with the product.

     

  • Maybe LB::select on an empty pool hangs.i understand he run pool command in irule before LB::select.

    it seems okay to me but i am running 10.2.3.

     

    [root@ve1023:Active] config  b version|grep -iA 1 version
    BIG-IP Version 10.2.3 112.0
    Final Edition
    
    [root@ve1023:Active] config  b virtual bar list
    virtual bar {
       snat automap
       fallback persist source_addr
       destination 172.28.19.79:80
       ip protocol 6
       rules myrule
       persist cookie
       profiles {
          http {}
          tcp {}
       }
    }
    [root@ve1023:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
            pool foo
            log local0. "\[LB::select\]: [LB::select]"
    }
    }
    [root@ve1023:Active] config  b pool foo list
    pool foo {
       members {
          200.200.200.101:80 {}
          200.200.200.102:80 {}
       }
    }
    
    [root@ve1023:Active] config  tail -f /var/log/ltm &
    [1] 30676
    [root@ve1023:Active] config  curl -I http://172.28.19.79
    HTTP/1.1 200 OK
    Date: Tue, 13 Mar 2012 23:50:49 GMT
    Server: Apache/2.2.3 (CentOS)
    Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
    ETag: "4183e4-3e-9c564780"
    Accept-Ranges: bytes
    Content-Length: 62
    Content-Type: text/html; charset=UTF-8
    Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/
    
    [root@ve1023:Active] config  Mar 13 16:50:30 local/tmm info tmm[4797]: Rule myrule : [LB::select]: pool foo member 200.200.200.102 80
    
    [root@ve1023:Active] config  curl -I http://172.28.19.79
    HTTP/1.1 200 OK
    Date: Tue, 13 Mar 2012 23:50:51 GMT
    Server: Apache/2.2.3 (CentOS)
    Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
    ETag: "4183e4-3e-9c564780"
    Accept-Ranges: bytes
    Content-Length: 62
    Content-Type: text/html; charset=UTF-8
    Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/
    
    [root@ve1023:Active] config  Mar 13 16:50:32 local/tmm info tmm[4797]: Rule myrule : [LB::select]: pool foo member 200.200.200.101 80
    
    [root@ve1023:Active] config  curl -I http://172.28.19.79
    HTTP/1.1 200 OK
    Date: Tue, 13 Mar 2012 23:50:53 GMT
    Server: Apache/2.2.3 (CentOS)
    Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT
    ETag: "4183e4-3e-9c564780"
    Accept-Ranges: bytes
    Content-Length: 62
    Content-Type: text/html; charset=UTF-8
    Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/
    
    [root@ve1023:Active] config  Mar 13 16:50:33 local/tmm info tmm[4797]: Rule myrule : [LB::select]: pool foo member 200.200.200.101 80
    
    

     

  • Posted By nitass on 03/13/2012 04:46 PM

     

    Maybe LB::select on an empty pool hangs.i understand he run pool command in irule before LB::select. That's right, I made a pool statement before the [LB::select]. The pool is not empty.

     

     

    it seems okay to me but i am running 10.2.3.

     

     

    [snip]

     

    Strange, you don't seem to have any problem with it at all. I've worked around the problem by moving what I was trying to do to the LB_SELECTED event, which is working fine for me. Having solved that, I also discovered that an LTM will honor a BIGipServer cookie set by another LTM. So that's interesting, but probably the topic of another thread.

     

     

     

    Thanks, everyone.

     

  • what was the worked around? I'm getting similar issue, but its has intermittently.

     

    about 75% of the requests hangs.

     

    • dkulinski_23252's avatar
      dkulinski_23252
      Icon for Nimbostratus rankNimbostratus
      My workaround was similar to dig's Instead of using LB::select I got hook after the member is selected ("when LB_SELECTED") and then call LB:detach & LB::reselect
    • satya07hyd_8175's avatar
      satya07hyd_8175
      Icon for Nimbostratus rankNimbostratus
      but in my irule i use LB::select to generate a token , which will be further used to persist connection ltm rule myirule { when HTTP_REQUEST { pool my-host-pool if {[HTTP::header exists LB-TOKEN]}{ set sid [HTTP::header value "LB-TOKEN"] log local0. "sid = $sid" if { $sid = "null" }{ log local0. "SID NULL !" set hex_sid "" scan [LB::select] %s%s%s%s%d command current_pool command2 current_member current_port scan [ split $current_member "." ] "%d%d%d%d" ip1 ip2 ip3 ip4 set ip3_hex [format "%02x" $ip3] set ip4_hex [format "%02x" $ip4] set port_hex [format "%04x" $current_port] append hex_sid $ip3_hex $ip4_hex $port_hex log local0. "hex_sid = $hex_sid , modifying header" HTTP::header replace "LB-TOKEN" $hex_sid log local0. "header_sid_value = [HTTP::header value LB-TOKEN] $current_member $current_port" pool $pool_name member $current_member $current_port } else { persist uie $sid } } }