Forum Discussion
JoshuaMessenger
Nimbostratus
Feb 27, 2015How 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...
JoshuaMessenger
Nimbostratus
Mar 09, 2015iRule is now working beautifully.
when CLIENT_ACCEPTED {
if {[info exists [table lookup storage_switch]]}{
set storage_pool "FCS_STORAGE_PRIMARY"
table set storage_switch $storage_pool indefinite
log local0. "pool selector: [table lookup storage_switch]"
log local0. "Does Table Exist - it should now? [info exists [table lookup storage_switch]]"
}
if { [active_members "FCS_STORAGE_PRIMARY"] >= 2 } {
if {[table lookup storage_switch] equals "FCS_STORAGE_FAILOVER"} {
log local0. "Kill All Connections!!!"
set storage_pool "FCS_STORAGE_PRIMARY"
table replace storage_switch $storage_pool indefinite
log local0. "pool selector: [table lookup storage_switch]"
}
pool FCS_STORAGE_PRIMARY
} else {
if {[table lookup storage_switch] equals "FCS_STORAGE_PRIMARY"} {
set storage_pool "FCS_STORAGE_FAILOVER"
table replace storage_switch $storage_pool indefinite
log local0. "pool selector: [table lookup storage_switch]"
log local0. "Kill All Connections!!!"
log local0. "Kill Cluster Sync!!!"
}
pool FCS_STORAGE_FAILOVER
}
}
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