Forum Discussion
someguy
Nimbostratus
Mar 05, 2015How can I reselect port after persistence and LB_SELECTED has selected a pool member?
I am trying to change the port that was selected during during persistence and LB decisions and then modify the destination port. I have tried several things with poor results. The below results in not being able to find the pool member, which I suspect is from no exact match on node/port combo. I have also tried using node but the port seems to be ignored. Any ideas? The general idea is to have one semi generic pool, and destination port be selected from based on URI mappings in a data-group.
ltm virtual myvirtual {
destination 10.1.1.10:any
ip-protocol tcp
mask 255.255.255.255
persist {
my_universal_persist_profile {
default yes
}
}
pool mypool
profiles {
http { }
tcp { }
}
rules {
my_port_rule
}
snat automap
translate-port disabled
vlans-disabled
}
ltm rule my_persist_rule {
when RULE_INIT {
set persist_timeout "60"
}
when HTTP_REQUEST priority 998 {
LB::detach
if { [HTTP::header exists "someheader"] } {
set myheader [HTTP::header "someheader"]
persist uie "$myheader" $persist_timeout
}
}
ltm rule my_port_rule {
when LB_SELECTED {
set server_port [class match -value "[HTTP::path]/" starts_with "node_ports"]
if { "$server_port" ne "" } {
LB::reselect pool [LB::server pool] member [LB::server addr] $server_port
}
}
when LB_FAILED {
log local0. "LB_FAILED"
}
}
ltm pool mypool {
members {
server1.mydomain.com:any {
address 10.10.10.10
session monitor-enabled
state up
}
server2.mydomain.com:any {
address 10.10.10.11
session monitor-enabled
state up
}
server3.mydomain.com:any {
address 10.10.10.12
session monitor-enabled
state up
}
}
monitor gateway_icmp
}
1 Reply
- Brad_Parker
Cirrus
should work for you.LB::reselect node [LB::server addr]
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