Forum Discussion
Perrot_Ludovic
Mar 13, 2017Nimbostratus
LB::Server pool empty
I need to switch between two different pools, based on availables members. I found several answers and test this one:
when RULE_INIT {
set static::BACKUP_POOL "/Partition/Backup_Pool"
}
when HTTP_REQUEST {
set default_pool [LB::server pool]
if { [active_members $default_pool] < 1 } {
pool $static::BACKUP_POOL
else {
pool $default_pool
}
}
}
However, LB::server pool always returns an empty string.
I am on version 11.4.1
- Leonardo_SouzaCirrocumulus
Do you have a default pool in the virtual server?
Also, you don't need to use the LB::server pool, if you use a default pool in the virtual server. A simplified iRule would be:
when RULE_INIT { set static::BACKUP_POOL "/Partition/Backup_Pool" } when HTTP_REQUEST { if { [active_members $default_pool] < 1 } { pool $static::BACKUP_POOL } }
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