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.