Forum Discussion

RAQS's avatar
RAQS
Icon for Cirrus rankCirrus
Feb 26, 2019

iRule to Enable/Disable pool member

Hi ALL,

 

I have requirement like whenever server team is doing some maintenance activity and ask us to enable/disable pool members. So, instead of logging to device and manually enabling and disabling it. Will it be possible to achieve this via iRule. Like when server team starts there activity then automatically that pool members should goes down and once activity is over then pool member should come up.

 

Appreciate all help.

 

Regards, ShashankS.

 

  • How about use an iControl script for this? You could have them run a powershell or bash command that would be a part of their deployment or maintenance runbook.

     

    Also, you could have a health monitor that they update a file, again either in a script or part of their task list, and the pool member would disable based on the monitor going down.

     

    There's plenty of examples for either option on devcentral, if you need help after trying them out, let us know!

     

  • Hey Shashank,

    Well there is a feature already on this on the LTM monitor. So on any monitor,

    recv
    - The text string that the monitor looks for to mark the pool member up. It contains a text string that is included in an HTML file on the backend servers.

    recv-disable
    - Similar to recv, but when this string that's configured matches in response. The corresponding pool member or node is marked session disabled.

    Often time, the server team will put "Server Up" as the string in their monitor page. But when the controlability is given to the server team to drain the traffic as a part of some maintenance activity. They can just modify the string to "Server Drain" in their monitor page. And the traffic will start bleeding.

    • recv  --> "Server Up"
    • recv-disable --> "Server Drain"

    So when "Server Drain" is set, the pool member will behave as below,

    Up (disabled) - The pool member or node allows existing connections until they are completed or timed out. However, the pool member or node is not available to receive new connections.

    Finally when all times out, no connections will be present.