Forum Discussion

serge_faller_83's avatar
serge_faller_83
Icon for Altostratus rankAltostratus
Jun 30, 2005

Which NODE info. are available (status, numbers ...) ?

I want to target a particular node in my irule, and I have some questions.

 

Can I use particular "statement command" ?

 

. Number of node = can I know the number (N) of node in the pool ?

 

-> to use irule on several configurations.

 

. Node adress = I dont wish to use the node adress @+port (ex.10.10.10200 80)

 

but just to indicate the element : node 1, or 2, or N (of the pool).

 

-> Allows a dynamic "irule".

 

. Status = How can I use LB_FAILED event for know status node ?

 

If the node is down, I'd like to be able to redirect towards an other node.

 

 

ps : Where could I find informations about the commands available and their use ?

 

("conf. guide for local traffic management" doesnt give details)

 

 

Thanks for tips and solutions.

 

  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    We do not currently have a command that would accomplish what you are seeking. You could initialize a Tcl list with the pool members in RULE_INIT and then reference them by index. Of course, that's somewhat of a mgmt hassle. I will consider adding a command that will return the list of members (and perhaps their status). The problem with using an index on active members is that depending on which member might drop out, your indexed references would get changed around.

     

     

    Also, I would suggest you use the command "pool member " instead of the node command, as this keeps the reference of which pool the node is within. The node command simply uses the speficied address/port regardless of whether it's in a pool or not.

     

     

    In the next release, we've already added some commands called LB::status, LB::up, LB::down which will help with determining and controlling pool member status.

     

  • thanks for the answers.

     

     

    It would be necessary that I can test the node state.

     

    Can I use "LB_FAILED" event for know status node ?

     

    ( conf. guide says : Lb_Failed ... or a selected pool member is not available)

     

     

    when CLIENT_DATA {

     

    set My_Node_1 "10.10.10.1 80"

     

    set My_Node_2 "10.10.10.2 80"

     

    if { condition } {

     

    node $(MY_NODE1)

     

    }

     

    when LB_FAILED { => selected pool member Node1 isn't available

     

    node $(MY_NODE2) then Node2

     

    }

     

    ...

     

     

    ps : Do you know when next release will be available?

     

     

    Thanks for help.
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    The best thing you can do is use the [LB::server addr] command to determine whether the LB failed because of no available nodes, or because of a problem connecting to that node. If there were no available nodes, then the [LB::server addr] command would return the empty string, otherwise it would return the address of the node and could be used to imply that it attempted to connect and failed.

     

     

    We have added a new command in the next release: [LB::status] which returns the status of the node (or an empty string is no node was available).

     

     

    Hope this helps.