Forum Discussion
Pallavi_Tadepal
Nimbostratus
Feb 21, 2006Locking on BigIP
Is there anyway to lock an operation taking place on BigIP? I have two nodes that contain the software to register with BigIP (create monitor,pool,irule,node, tie rule to pool,tie rule to Virtual server).
When I try to register both nodes simultaneously (with the same name for the monitor, pool), I would like to lock the commands create pool, create monitor while the second node is waiting to ensure that both nodes do not attempt to create the same monitor, pool together.
currently, the solution is to introduce a delay between the operations taking place. This is an external program enforcing the delay. I would like to do a more cleaner solution and wondered if there is any way of doing so.
Thanks,
Pallavi
- Unfortunately, there isn't an easy way to do this as all calls are treated independently. But, iControl is implemented as a single FIFO queue so you can be assured that if you issue two requests, they will not be executed side-by-side but one will always execute to completion before the other.
call create if success proceed if soapFault if soapFault->soapDetails contains exists optionally verify object exists already proceed else error condition
- Another option I just thought of might work as well. You could use the Management::DBVariable interface to create a "locking" variable implemented as a record in the configuration database. The DBVariable sample in the SDK shows how to list, create, delete, get and set database variables.
set lock = value-of icontrol.lock varaible if error create icontrol.lock variable with value of 1 do work delete icontrol.lock variable else if lock == 0 set icontrol.lock variable with value of 1 do work delete icontrol.lock variable else if lock == 1 sleep and try again
- Pallavi_Tadepal
Nimbostratus
Thanks for your replies Joe. I think we will go with the first option though since the second option may still cause deadlocks. We did think of the first option ourselves but were not sure if it was the most clean way to go.
Recent Discussions
Related Content
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