Forum Discussion

goatman64_12745's avatar
goatman64_12745
Icon for Nimbostratus rankNimbostratus
Jun 21, 2006

icontrol equivalent call for 'b node down'

What is the equivalent call in iControl v9.0 to disable a node address? I'm using LocalLB::NodeAddress::set_session_enabled_state and setting disabled. In the BigIP UI this sets a state "Only persistent or active connections allowed." What I want is a UI state of "Only active connections allowed."
  • The state of a node address is set with both the LocalLB::NodeAddress::set_monitor_state() method as well as the LocalLB::Node::set_session_enabled_state() method. This has been discussed on the DevCentral forums although the information is kind of spread across a couple of threads.

     

     

    Here's the mapping between the GUI radio options and the iControl methods:

     

     

    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

     

     

    The source for the inconsistency between the GUI and iControl is due to the fact that iControl is based on the internal schema and the GUI made some cosmetic changes to combine these two attributes into a single 3-way radio for usability.

     

     

    -Joe

     

  • The LocalLB::PoolMember interface has the same methods described above and behave in the same manner

    void LocalLB::PoolMember::set_session_enabled_state(
        in String[] pool_names,
        in MemberSessionState[][] session_states
    );
    void LocalLB::PoolMember::set_monitor_state(
        in String[] pool_names,
        in MemberMonitorState[][] monitor_states
    );

    -Joe
  • For the monitor_state, you'll want to use the get_monitor_status. You are right that this has 9 possible status values. Basically go with the UP value for a good state and the others either indicate a bad state or that the BIG-IP is in the process of checking it with a monitor.

     

     

    For the session_enabled_state, use the get_session_enabled_status method. The get_session_status method has additional information regarding the reason for the new sessions attribute being off.

     

     

    And, yes these methods work for PoolMembers as well.

     

     

    As for your last question, disabling a node for maintenance, to get the number of current connections, you are going to have to query the staistics with the get_statisics() method and look for the "STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS" statistic and retry querying the statistics until this value is zero.

     

     

    Let me know if this didn't clarify things for you.

     

     

    -Joe
  • Not sure what you are asking about the status colors. There are no parameters for the set methods that directly equate to these. Basically when you call get_monitor_state() the value can depend on what's going on with everything behind the scenes (is the monitor currently running, has the monitor not run yet, has it reported an up or down state, has it been disabled by a parent object, etc.) You can set the monitor_state to either enabled or disabled for an object, but the status is what's going on at the moment you make the request for get_monitor_status().

     

     

    The possible values for the monitors status is:

     

     

    MONITOR_STATUS_UNCHECKED 0 Status of an enabled object that is not being monitored.

     

    MONITOR_STATUS_CHECKING 1 Initial status of a object until its monitors report.

     

    MONITOR_STATUS_UP 2 Status of an enabled object when its monitors succeed.

     

    MONITOR_STATUS_DOWN 3 Status of an enabled object when its monitors fail.

     

    MONITOR_STATUS_FORCED_DOWN 4 Status of a object when it's forced down manually.

     

    MONITOR_STATUS_MAINT 5 Status of an object when in maintenance mode.

     

    MONITOR_STATUS_ADDRESS_DOWN 6 Status of an object whose node address monitor fails.

     

    MONITOR_STATUS_DOWN_BY_IRULE 7 Status of an object which has been marked down by an iRule.

     

    MONITOR_STATUS_DOWN_WAIT_FOR_MANUAL_RESUME 8 Status of an object which has been marked down, and should be manually marked up.

     

     

     

    Not sure if this answers your question or not. If not, let me know and I'll try to clarify it further.

     

     

    -Joe
  • Posted By Joe on 06/21/2006 10:09 AM

     

     

    Here's the mapping between the GUI radio options and the iControl methods:

     

     

    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 heart dev central.

     

     

    Thanks for helping me solve my problem of the day!

     

     

    -k