Forum Discussion

RichKL_77280's avatar
RichKL_77280
Icon for Nimbostratus rankNimbostratus
Aug 18, 2008

Pool member: Force offline

I'm using LocalLBPoolMember.get_session_status to tell what a particular pool member's status is.

 

 

The three statuses I'm trying to be able to query and modify through this code, as taken from the web interface:

 

 

Enabled (All traffic allowed)

 

Disabled (Only persistent or active connections allowed)

 

Forced Offline (Only active connections allowed)

 

 

I don't believe get_session_enabled_state is the function I want to use to query those statuses, because it only has two possible values:

 

 

STATE_DISABLED

 

STATE_ENABLED

 

 

I think get_session_status is the right one, but am confused by it's four possible values:

 

 

SESSION_STATUS_ENABLED

 

SESSION_STATUS_DISABLED

 

SESSION_STATUS_FORCED_DISABLED

 

SESSION_STATUS_ADDRESS_DISABLED

 

 

I don't know what address_disabled is, but the rest of those statuses look like they correspond to the web interface's options for a pool member's status.

 

 

So, here's the real question: How come there's no LocalLBPoolMember.set_session_status? How does the web interface change those values? How do I? I've seen the previous thread about gracefully disabling a node, but implementing a timed poll and then doing a set_monitor_state to finally disable the node does not seem like what the web interface is doing. Can you help me figure what it is I need to call?

5 Replies

  • This thread should take care of you...

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=1&tpage=1&view=topic&postid=28142814

     

     

    Click here
  • Don_MacVittie_1's avatar
    Don_MacVittie_1
    Historic F5 Account
    Hey RichKL,

     

     

    IIRC, you actually want object_state and monitor_status. These two are used in combination to determine the state in the UI. If the monitor marks it as down then it is status disabled, if it is set to disabled (through iControl or it's parent) then it is "forced offline".

     

     

    I searched for this discussion here and can't find it... So this is from memory. I will turn out an iC2I article on this topic for you relatively soon, since it's not turning up in searches. Hopefully this gets you started in the meantime though.

     

     

    Don.
  • Don_MacVittie_1's avatar
    Don_MacVittie_1
    Historic F5 Account
    Or follow citizen_elah's link, he's got the thread I was searching for.

     

     

    :-)

     

     

    Don.
  • Here's another thread where I discuss the 3-way toggle state in the GUI and how it relates to the APIs.

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=1&postid=8604&view=topic

     

    Click here

     

     

     

    -Joe
  • That's great information! Thanks so much!

     

     

    I really appreciate the mapping that Joe wrote out:

     

     

    Enabled (All traffic allowed):

     

    set_monitor_state : STATE_ENABLED

     

    set_session_enabled_state : STATE_ENABLED

     

     

    Disabled (Only persistent or active connections allowed):

     

    set_monitor_state : STATE_ENABLED

     

    set_session_enabled_state : STATE_DISABLED

     

     

    Forced Offline (Only active connections allowed):

     

    set_monitor_state : STATE_DISABLED

     

    set_session_enabled_state : STATE_DISABLED

     

     

    I'd propose that make it's way into the documentation somewhere, though I'm not exactly sure where.