Awkrd1_7470
Jan 11, 2012Nimbostratus
Fallback to different VIP in iRule, need status checking and iRule exit
I used the example in a 2/15/2010 post "Fallback to different VIP in i-Rule" as a solution and it worked like a charm until the two VIPs (backing up each other) both lost all pool members. This caused an infinite loop of the i-Rule(s) due to no pool status checking and the LTM cored (9.4.8 HF4). I need to verify the pool members availability as a safe guard and exit the i-Rule if members are not available. What am I missing? The fail over is not working on the modified rule "Modified i-Rule with pool state check and exit to prevent looping".
Thanks!
----------------------------------------------------------
Original i-Rule example from (2/15/2010)
when HTTP_REQUEST {
Check if currently selected pool has no active members
if {[active_members [LB::server pool]] == 0}{
Use the fallback VIP
virtual fallback_vip
}
}
-----------------------------------------------------------
My original modified i-Rule implemented across two VIPs (backing up each other), worked fine until both pool are down; causing LTM to core in infinite loop. }
rule Name {
when CLIENT_ACCEPTED {
Check if currently selected pool has no active members
if {[active_members [LB::server pool_A]] == 0}{
Use the fallback VIP
virtual fallback_vip_B
}
}
}
-----------------------------------------------------------
Modified i-Rule with pool state check and exit to prevent looping
rule name {
when CLIENT_ACCEPTED {
Check if currently selected pool has no active members
if {[active_members [LB::server pool_A]] == 0}{
Check if the fallback VIP has active members
extra if prevents looping
if {[active_members [LB::server Pool_B]] > 0}{
Use the fallback VIP
virtual fallback_vip_B
take corrective step
} else {
discard
}
}
}