Forum Discussion

Piyush_72418's avatar
Piyush_72418
Icon for Nimbostratus rankNimbostratus
Oct 14, 2010

Node Disable using pycontrol

Hey! Anyone ported

 

 

Disabling Node Servers :

 

 

http://devcentral.f5.com/wiki/default.aspx/iControl/DisablingNodeServers.html

 

 

to pycontrol ..?

 

 

if not please tell how to disable Node using pycontrol - I have samples for disable member using pycontrol!

 

 

Thanks!

 

Piyush

 

3 Replies

  • You shouldn't need to much customization to this script to suit your needs:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/Pycontrol2DisablePoolMember.html Click Here
  • Hello Jason,

     

     

    Basically I want to STOP all traffic (no active / or persistent connections) on a NODE.

     

     

    AFAIK - I have to mark down the Node in STATE_DISABLED (Monitor Only - not session state)

     

     

    please correct me if I am wrong.

     

     

    As per http://devcentral.f5.com/wiki/default.aspx/iControl/DisablingNodeServers.html I have to first get all Pools and then get all members and the find my Node in which pools it is and then mark the monitor state as STATE_DISABLED

     

     

    So can you please point me to correct monitor state

     

     

    is it sufficient

     

     

    mstate = b.LocalLB.PoolMember.typefactory.create('LocalLB.PoolMember.MemberMonitorState')

     

    mstate.member = member_factory(b,x)

     

    mstate.monitor_state = 'STATE_DISABLED'

     

    monitor_states.append(mstate)

     

     

    b.LocalLB.PoolMember.set_monitor_state(pool_names = [POOL], monitor_states = [mstate_seq])

     

     

    Sorry - but need some detailed info of the state.

     

     

    Thanks for your help in explaining it.

     

     

    ~/Piyush

     

  • This link (Click Here) covers the monitor states themselves. You'll need the LocalLB::NodeAddress interface. The methods addressed in the link provided are the same for node as they are for pool member. Note, however, that forcing a pool member or node offline doesn't stop all traffic, it just stops all non-active connections.