Forum Discussion
zafer
Nimbostratus
Sep 10, 2007convert v9x to v4x
Hello,
how can i change this code for v4.x
best regards
zafer
when RULE_INIT {
These are global variables
set ::time [clock seconds]
set ::poolb_selected 0
log local0. "second time from epoc is: $::time"
}
when CLIENT_ACCEPTED {
set persist_time 180
if { [active_nodes poolA] == 0} {
log local0. "poolA is failing..."
if { $::poolb_selected equals 0 } {
log local0. "poolB value is: 0"
set ::time [clock seconds]
set ::poolb_selected 1
pool poolB
persist source_addr 180
} else {
log "poolB value is: $::poolb_selected"
pool poolB
}
} else {
log local0. "poolA is available..."
if { $::poolb_selected == 0 } {
log "poolA never went down"
} else {
log "poolb_selected value is: $::poolb_selected"
set curtime [clock seconds]
set expirationTime [expr {$::time + $persist_time}]
if { $curtime > $expirationTime } {
set ::poolb_selected 0
pool poolA
} else {
pool poolB
}
}
}
}
7 Replies
- zafer
Nimbostratus
anybody help me? - There are several issues with back-porting this to v4.x:
1. 4.x does not have support for user based local variables.
2. 4.x has no "clock" command for determining time.
Looks to me that there is not way to fully support this in v4.x. Anyone else have any ideas?
-Joe - zafer
Nimbostratus
Hi Joe
Could you give me any suggestion for this problem, i want explain to you why
we wrote this code.
we have two site, A and B and we have redundant LTM 5100 units each sites
if Site A goes down (vip nodes goes down), redirect traffic to Site B and keep
traffic 7 days
thats all .
what can i do ?
best regards
zafer - Deb_Allen_18Historic F5 AccountHi Zafer -
I agree with Joe, there really isn't a way to automate this with iRules.
/deb - zafer
Nimbostratus
Hi Deb,
Could you please help me how can i solve my problem, i want exxplain what i want do
we have two wan site A and B
they have connectivity each site has same server but different ip network
Pool A in Site A node1: 1.1.1.1 node2: 1.1.1.2
Pool B in Site B node1: 2.2.2.1 node2: 2.2.2.2
same servers and contents They are ldap servers and it does not important application replication for us
Clients know same vip adress (not dns adress) and they dont change anythings
client request vip (in site A) if poolA is down not have active member, i enable Pool B for this vip and pool B has Site B nodes and add persistency with 7 days and after 7 days persistency record will expire.
i tested my irule in v9 it worked but we use 5100 model with v4.x and you say i cant use it
so What can i do for this issue?
regards
zafer - Deb_Allen_18Historic F5 AccountHi Zafer -
You might be able to create a 4.x version of this iRule:
http://devcentral.f5.com/wiki/default.aspx/iRules/SingleNodePersistence.html
(Click here)
by configuring your pool with these persistence settings:persist 1 persist_timeout 604800 lb_method round_robin
HTH
/deb - zafer
Nimbostratus
Hi deb,
thanks for information but i gaved shortly sample for explanation
we use 3 members in pool each site
regards
zafer
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
