Forum Discussion

alex_der_101956's avatar
alex_der_101956
Icon for Nimbostratus rankNimbostratus
Dec 09, 2004

Method to disable/enable a server?

Hi,

 

 

When looking at the LocalLBNode perl example, I was wondering if there is a method to disable/enable a server, or do you have to loop through all the nodes on a server?

 

 

Thanks
  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    Yes, there are methods to enable/disable individual pool members and node addresses. For example, in v9.x:

     

     

    - LocalLB::PoolMember/NodeAddress::set_session_enabled_state - if set to TRUE, will disallow new sessions from establishing, while still allowing existing sessions to go through, essentially used to bleed off the existing connections.

     

     

    - LocalLB::PoolMember/NodeAddress::set_monitor_state - if set to TRUE, will bring the pool member or node address down immediately.

     

     

    Please refer to the SDK for the signatures and descriptions of these methods.

     

    Loc
  • By "Server" do you mean "Virtual Server" or a single Node Address. There are several ways to disable services.

    1. Disable service on a specific node:port (Node Server).

    void ITCMLocalLB::Node::set_state( 
         in IPPortDefinition[] node_defs, 
         in EnabledState state 
     );

    2. Disable service on all services for a given node (Node Address).

    void ITCMLocalLB::Node::set_node_address_states( 
         in String[] node_ips, 
         in EnabledState[] states 
     );

    3. Disable an entire Virtual Address

    void ITCMLocalLB::VirtualServer::set_state( 
         in IPPortDefinition[] virtual_servers, 
         in EnabledState state 
     );

    -Joe