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?
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.