Forum Discussion

Stefan98_85555's avatar
Stefan98_85555
Icon for Nimbostratus rankNimbostratus
Oct 26, 2011

disable pool member with an irule

I try to disable pool members with an http-request. The request has the form :

 

 

http://VIRTUAL_SERVER/down/NODE_IP

 

 

I wrote this irule:

 

 

when HTTP_REQUEST {

 

if {[scan [HTTP::uri] "/down/%s" server] == 1} {

 

LB::down node $server

 

log local0. "URI: [HTTP::uri] MATCHED. server=$server"

 

} else {

 

 

}

 

}

 

 

The irule seems to work, because if i call the URL, i get an log entry:

 

Oct 26 15:00:37 tmm tmm[1955]: Rule MN_NODE : URI: /down/192.168.0.11 MATCHED. server=192.168.0.11

 

 

But the server won't be disabled. What did i wrong?

 

 

thanks for help...

 

 

2 Replies

  • it is a bug i.e. Bug 222047 - LB::down node does not work (Formerly CR 110633) LB::down and LB::down pool ... work fine.

    [root@iris:Active] config  b virtual bar list
    virtual bar {
       snat automap
       pool foo
       destination 172.28.17.33:http
       ip protocol tcp
       rules myrule
       profiles {
          http {}
          tcp {}
       }
    }
    [root@iris:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
       if {[scan [HTTP::uri] "/down/%s" server] == 1} {
          LB::down pool foo member $server 80
          log local0. "URI: [HTTP::uri] MATCHED. server=$server"
      }
    }
    }
    
    [root@iris:Active] config  curl -I http://172.28.17.33/down/10.10.70.110
    curl: (52) Empty reply from server
    
    [root@iris:Active] config  cat /var/log/ltm
    Oct 26 21:28:09 local/iris notice mcpd[2926]: 01070638:5: Pool member 10.10.70.110:80 monitor status iRule down.
    Oct 26 21:28:09 local/tmm err tmm[4672]: 01010028:3: No members available for pool foo
    Oct 26 21:28:09 local/tmm info tmm[4672]: Rule myrule : URI: /down/10.10.70.110 MATCHED. server=10.10.70.110