Forum Discussion

micah_64538's avatar
micah_64538
Icon for Nimbostratus rankNimbostratus
Mar 09, 2009

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

 

1 Reply

  • The solutions posted to the forums for re-configuring the web server to run the iControl Portal as multiple processes is not endorsed by F5. There are known issues with modifying the configuration from it's default settings and this is one of them. The pseudo-locking implemented with the SystemInfo Locking methods is done in-process within the iControl Portal. When the configuration is changed to create multiple running portals, there is no longer a single process managing the locks so unfortunately if you opt to change the Apache configuration, this is going to break the locking mechanism.

     

     

    Another side-effect is that Partition management is done in-process as well. So if you are configuring Administrative Partitions, then the methods of setting the partitions will likely not work as you are not certain as to which server process you will be attaching to on your requests.

     

     

    The config sync timeout issues should be brought through support and the problem should be addressed by product development.

     

     

    -Joe