Forum Discussion
t_mantel_89732
Nimbostratus
Nov 25, 2009Problems with irule "Pool_Member_Status_Page_on_a_Virtual_Server" after migrating to Bigip LTM v10.0.1 HF3
Hello,
we did an upgrade from Bigip LTM 9.3.0 HF3 to 10.0.1 HF3 and were using an irule we think was written by Bhattman (cmbhatt)... this one
http://devcentral.f5.com/wi...
t_mantel_89732
Nimbostratus
Feb 22, 2010Hi,
we do updates to this files manually because usally our nodes and hostnames don't change very often.
we did a grep for some services like dns which we want to monitor ... code is from a internal developer ...
We got a cronjob at /etc/cron.daily which does ...
-----------------------------
!/bin/bash
LOG=/tmp/cron_pool.$$.log
failoverstatus und syncstatus bestimmen
folgender befehl sollte entweder standby oder active liefern
STATE=`b failover show | awk '{print $2}'`
folgender befehl liefert eine '0' wenn im SYNC oder 1,2 oder 3 wenn nicht im Sync
SYNC_VORHER=`b config sync show | grep Status | awk '{print $2}'`
if [ "$STATE" = "active" ]; then
erzeugen der neuen Listen
echo "Erzeuge vorlaeufige Pool- und Node-Liste" >> $LOG
b pool all member all -n | grep -i " ACTIVE" |egrep ":25|:80|:110|:53|:995|:7210" | awk '{print "\""$3"\","}' | sort >/var/class/pool_member_status_list.class.tmp
b node all screen | awk '{print "\"" $2 "/" $6 "\","}' > /var/class/node_screen_name_list.class.tmp
CHK='gleich'
achtung diff liefert exitcode 0 bei gleichheit
if ! diff /var/class/pool_member_status_list.class.tmp /var/class/pool_member_status_list.class >> $LOG ; then
CHK='pool'
elif ! diff /var/class/node_screen_name_list.class.tmp /var/class/node_screen_name_list.class >> $LOG ; then
CHK='node'
fi
if [ $CHK = 'gleich' ]; then
echo "keine Aenderungen, nix zu tun [$CHK]" >> $LOG
else
echo "Es gibt Aenderungen [$CHK]" >> $LOG
mv /var/class/pool_member_status_list.class.tmp /var/class/pool_member_status_list.class 2>>$LOG >>$LOG
mv /var/class/node_screen_name_list.class.tmp /var/class/node_screen_name_list.class 2>>$LOG >>$LOG
in jedem Fall laden, denn ich bin ja auf dem aktiven System
echo "Lade neue Config" >> $LOG
b load 2>>$LOG >>$LOG
wenn die Config auf der aktiven Maschine geaendert wurde
auf den Peer syncen. Der Sync transferriert auch die
gerade neue erzeugten class-Files
ABER nur, wenn vorher gesynct war
if [ "$SYNC_VORHER" = "0" ]; then
echo "synce $SYNC_VORHER" >> $LOG
b config sync all 2>>$LOG >>$LOG
fi
fi
else
echo "ich bin standby -> Listen werden nur auf aktivem erzeugt und dann gesynct" >> $LOG
fi
exit 0
---------------------------
and the class file looks like
/var/class/pool_member_status_list.class
"admin_A/192.168.10.100:53",
"admin_B/192.168.10.112:53"
the /var/class/node_screen_name_list.class
"192.168.10.100/none",
"192.168.10.112/none"
Toby
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects