Forum Discussion
Keith_11159
Nimbostratus
Apr 01, 2008LBPool.GetPersistenceRecord
I'm new to iControls and I'm a bit confused as to how the GetPersistenceRecord calls work.
We have BigIP setup such that when a client connects, his connect request has an embedded key. We use this key to load balance all clients with matching keys to the same pool member, using the 'session lookup uie' and 'session add uie' commands to store and retrieve the key->pool member mappings. What I'd like to be able to do with the iControl is pass it a specific key, and have the iControl delete the persistence record associated with that key.
I'm confused about the LBPool.GetPersistenceRecord(String poolName, LocalLBPersistenceMode mode) and LBPool.deletePersistenceRecord(String[] poolNames, LocalLBPersistenceMode modes[]) methods. I have multiple persistent connections to the same pool under the same mode (uie) each with a different value (key). But based on the method signature, GetPersistenceRecord appears to only return a single record. I'd like to delete a persistence record with a specific value (key), but deletePersistenceRecord doesn't allow me to pass the key name - does that mean it'll delete them all?
I can run the 'b persist pool mode universal show all' command on the commandline and see that there are multiple persistent connections to the same pool, each with a different value (key). The output seems consistent with my understanding that each pool can have multiple persistence records for each type of persistence mode. Am I looking at the wrong class/methods, or did I misunderstand something?
I tried to just run the code and see what I got back, but I get an IllegalArgumentException on the GetPersistenceRecord call and I don't have the slightest clue why. Instead I tried calling the multi-argument version GetPersistenceRecord(String[], LocalLBPersistenceMode[]), but I'm getting back 1 row of empty columns. I'm passing the results of getList() for the pool names argument, and I can see my pool name in that list.
Thanks in advance for any help.
5 Replies
- Don_MacVittie_1Historic F5 AccountHi Keith,
- Keith_11159
Nimbostratus
Yes, I'm using the Java Wrappers for iControl. The exception is at the bottom of this message. When I pass in a pool name that has no persistence records, the method call runs without error and returns null. When I pass in a pool name that does currently have persistence records, I get the IllegalArgumentException. - Don_MacVittie_1Historic F5 AccountThe getPersistenceRecord(String poolName, LocalLBPersistenceMode mode) routine returns the first one if there are multiple. I have added to my list that we really should either return the array or let the caller indicate which one they're interested in.
- Keith_11159
Nimbostratus
I don't think we're using partitions - I don't see the Management.Partition.wsdl in the list of Available iControl Service Descriptions. We're using BIG-IP 9.3.1, and from what I saw in the iRule tutorials partitions are only available in 9.4 correct? - Don_MacVittie_1Historic F5 AccountHey Keith,
Recent Discussions
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