Forum Discussion

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

Node Disable using pycontrol

Hey! Anyone ported



Disabling Node Servers :



to pycontrol ..?



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







3 Replies

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


  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 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'





    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.





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