JoshuaMessenger
Feb 27, 2015Nimbostratus
How would I use a Table as a global cross tmm variable to be CMP compliant?
I've been asked to handle load-balancing and automatic fail over between an active / passive CIFS / NFS storage system. I have the user_conf setup to monitor the ltm logs and trigger bash scripts on primary pool failure. The issue I currently have is: If i use TCL variables or Global Variables because the irule needs to modify the variable to prevent continuous file system fail overs the VIP is being demoted from CMP causing only 1 core to be used.
Below is the irule. Any help on using tables or sessions would be appreciated as all cores need to be used as Day 1 is 2 million file transactions and 1 year from now its supposed to scale to 50 million.
when RULE_INIT {
set static::trackingVar 0
log local0. " Global Variable Initialized $::static::trackingVar"
}
when CLIENT_ACCEPTED {
if { [active_members "PrimaryStorage"] >= 2 } {
if {$static::trackingVar == 1} {
log local0. "Kill All Connections!!!"
set static::trackingVar 0
}
pool PrimaryStorage
} else {
if {$static::trackingVar == 0} {
set static::trackingVar 1
log local0. "$static::trackingVar"
log local0. "Kill All Connections!!!"
log local0. "Kill file Cluster Sync!!!"
log local0. "Enable Read Write On Secondary Cluster!!!"
}
pool FailoverStorage
}
}