Forum Discussion

Jonas_Karlsson1's avatar
Jonas_Karlsson1
Historic F5 Account
Feb 15, 2005

Checking node status from iRules

Hi,

 

 

As far as I can see from documentation available and posts to this forum there is no way to check the status of a node from within an iRule. Correct?

 

 

Cheers

 

 

Jonas

10 Replies

  • This thread will get you started...

     

     

    http://devcentral.f5.com/default.aspx?tabid=28&forumid=5&postid=1602&view=topic

     

     

    -Brian
  • You need to create a universal persistence profile that executes an iRule. (Or are you past that point?)

     

     

    Can you post what you have so far?

     

     

    Thanks,

     

    Brian

     

     

  • Did you test this? Is there a reason you can't use a health monitor to take the node in question out of the pool.

     

     

    Thanks,

     

    -Brian
  • Jonas_Karlsson1's avatar
    Jonas_Karlsson1
    Historic F5 Account
    Hi,

     

     

    I have only looked at it to see if it's possible to do what's needed. If I can find a way to check if the server is up it can be done.

     

     

    Cheers

     

     

    Jonas
  • I think the right approach is to use a health monitor to manage the pool's node status. And you can then write a custom universal persistence profile to manage the persistence info.

     

     

    Devs? What do you think? Is my suggestion the preferred approach?

     

     

    Thanks,

     

    Brian
  • Jonas_Karlsson1's avatar
    Jonas_Karlsson1
    Historic F5 Account
    Would it be possible for persistence profile to select another node and have the iRule check what node was actually selected? Then I could modify the persistence entry to go point to that node instead.

     

     

    Cheers

     

     

    Jonas
  • I don't think you need to do that. Double check with support, but I'm pretty sure persistence entries for a node that is marked down by a monitor get invalidated.

     

     

    -Brian
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    Yes, Brian, you are correct on this. When a persist entry is used, it is first checked to see whether the resulting pool member is still active. If it is not still active, the persist entry will be replaced after the connection is re-load-balanced. This sounds like it should handle the scenario.

     

     

    If they are interested in more specifically controlling the node that gets selected in the event the node is down, you could write a rule that would first do the persist lookup and node select, then if the connection failed to that node (because the node is down), you could pick the new node using whatever mechanism you want (in the LB_FAILED rule event). (I should also add that when the node in the persist entry is down, the LB_FAILED event is not triggered - it's treated more like there was no persist entry to begin with).
  • Jonas_Karlsson1's avatar
    Jonas_Karlsson1
    Historic F5 Account
    Great!

     

     

    That looks like the way to do it.

     

     

    The only problem is that i can't find any reference to LB_FAILED anywhere in the documentation or on this site. Anything special that would be good to know about it=

     

     

    Cheers

     

     

    Jonas
  • In regards to:

     

     

    (I should also add that when the node in the persist entry is down, the LB_FAILED event is not triggered - it's treated more like there was no persist entry to begin with)

     

     

    Do you mean marked down by LTM, or that the server connection failed? I'm trying to figure out what to do with the 15 seconds between server failure and LTM recognition of that failure for connections that I've built an entry into the session table.