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 serv...
Feb 23, 2006
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.
You could then from your nodes, query this values existence. If it's not set, then set it and do your work. Something like this:
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
With this approach there is still a chance of a collision if parallel requests are going in at the same time. Both could query the value of the variable at the same time and fall into the same condition.
Not sure which will work better for you but this will give you a couple of options.
-Joe
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