Klaus_Gerthein1
Aug 31, 2012Nimbostratus
Getting uie persistence info from persistence table
Hello,
I am load balancing a mysql master master cluster via persist uie to ge a single node persistence.
I used this documentation: https://devcentral.f5.com/wiki/irules.singlenodepersistence.ashx
This is working fine.
Now I want to do the database backup on the pool member which is not used by this persistence via a seperate virtual server.
----
Write Virtual DB Server:
Virtual Server IP 10.6.1.2:3306
pool db_write members 10.4.9.9:3306 and 10.4.9.8:3306
----
Back Virtual DB Server:
Virtual Server IP 10.6.1.2:3307
pool db_backup members 10.4.9.9:3306 and 10.4.9.8:3306
----
On the "Backup Virtual DB Server" I want to run an irule which checks
which Pool Member from "Write Virtual DB Server" is currently the persist pool member.
Via command line I got this information:
show ltm persistence persist-records pool db_write
Sys::Persistent Connections
universal 10.6.1.2:3306 10.4.9.9:3306 1
universal 10.6.1.2:3306 10.4.9.9:3306 3
But via irule I got no information:
when CLIENT_ACCEPTED {
set PersistTo [persist lookup uie { 1 pool db_write } ]
log local0. "Current Persist Master is $PersistTo"
}
or
when CLIENT_ACCEPTED {
set PersistTo [list [persist lookup uie 1]]
log local0. "Current Persist Master is $PersistTo"
}
I always got an emtpy log entry
: Current Persist Master is
: Current Persist Master is {}
----
Kind regards
Klaus