Forum Discussion

Scot_85536's avatar
Scot_85536
Icon for Nimbostratus rankNimbostratus
Dec 04, 2009

Irule winner Chetan Bhatt's entry

Apparently nobody checks the validity of the irules once posted? Chetan Bhatt's irule had three typos that prevents it from being valid. It is missing one quote and two escapes in front of other quotes. I'm anxious to load it up, looks cool!
  • You can check out the complete irules here

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/Pool__Member__Status__Page_on_a__Virtual__Server_v10.html

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/Pool_Member_Status_Page_on_a_Virtual_Server.html

     

     

    There already has been some contribution to the original code.

     

     

    Bhattman

     

  • Seems like the 9.4.7 version doesn't include handling for HA clusters like the v10 does - any chance that can be added, so the b load statement only happens on the Active node?
  • You could replace

     

     

     

    !/bin/bash

     

    b pool all |grep "POOL MEMBER" | awk '{sub(":any",":0",$4);print "\""$4"\","}' | sort >/var/class/pool_member_status_list.class

     

    b load

     

    exit 0

     

     

     

     

     

    with

     

     

     

    !/bin/bash

     

    b pool all |grep "POOL MEMBER" | awk '{sub(":any",":0",$4);print "\""$4"\","}' | sort >/var/class/pool_member_status_list.class

     

     

    if [ "`/bin/ps1`" == "Active" ]; then

     

    b load

     

    fi

     

     

    exit 0

     

     

     

     

     

    I hope this helps

     

     

    Bhattman
  • milo's avatar
    milo
    Icon for Nimbostratus rankNimbostratus
    Is there another command we can use besides "b load" to update the datagroup when the external file changes? I think we ran into a memory issue and lost our config after running the "b load" command.
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Yep:

     

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=11704231170423

     

     

    you do not have to do a full b load

     

     

    You can get away with toggling one of the attributes on the class. Here's a CodeShare entry that does the trick

     

     

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

     

    Click here

     

     

    I hope this helps

     

     

    Bhattman

     

     

     

     

    Aaron
  • milo's avatar
    milo
    Icon for Nimbostratus rankNimbostratus
    Thanks for the quick response. It's going to take me a while to understand how to use the CodeShare entry. In the mean time, can I remove the b load command from the pool member status cron job if I run it after a daily config sync cron job using

     

     

    bigpipe fo | grep -q "FAILOVER standby" && nice b config sync pull
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    If you want to programmatically force a re-read of the external datagroup file, you could create the PingExternalClass Perl script on LTM and then call it from the script you're running from cron.

     

     

    Aaron
  • milo's avatar
    milo
    Icon for Nimbostratus rankNimbostratus
    I appreciate the Perl script, Hoolio. I didn't realize it would be so easy to implement. It works great.