micah_64538
Mar 09, 2009Nimbostratus
Unable to use locks and sync
Remote configsync was broken until implementing the fix detailed in this thread: http://devcentral.f5.com/Default.aspx?tabid=53&forumid=1&postid=1496&view=topic&tpage=2
After changing -processes 1 to -processes 2, we are are unable to use locks. Perhaps a lock is associated with a particular process? I can acquire the lock but then frequently it does not show up in the lock list. I changed my httpd.conf back to -process 1, and it started working reliably.
Is there a fix to have both remote configsync and locking?
sample test code (java) I used:
public class test {
public static void main(String[] args) {
String bigip = "mybigiphostname";
long port = 443;
String user = "myictrluser";
String pass = "myictrlpass";
iControl.Interfaces interfaces = new iControl.Interfaces();
interfaces.initialize(bigip, port, user, pass);
try {
System.out.println("acquiring lock \"remoteSyncLock\"");
iControl.SystemSystemInfoBindingStub mySystemStub = interfaces.getSystemSystemInfo();
boolean success = mySystemStub.acquire_lock("remoteSyncLock", 10 , "Test Lock");
System.out.println("result of acquisition: " + success);
System.out.println("listing all locks");
String[] lockList = mySystemStub.get_lock_list();
System.out.println(lockList.length + " locks were found");
for (int a=0; a < lockList.length; a++) {
System.out.println("lock: " + lockList[a]);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
When it does not work, this is the output:
acquiring lock "remoteSyncLock"
result of acquisition: true
listing all locks
0 locks were found
When it works, this is the output:
acquiring lock "remoteSyncLock"
result of acquisition: true
listing all locks
1 locks were found
lock: remoteSyncLock