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
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.
So, for you situation, what I would do would be to code the calls to create the objects and catch the SOAPFault on error. If you method to create receives a fault (most likely from the object already existing), you could look into the faultdetails as to whether the object already exists. If you want to verify further, then you can always call one of the query methods to determine whether it does indeed exist. and then move on.
So, the pseudo-code would look something like this:
call create
if success
proceed
if soapFault
if soapFault->soapDetails contains exists
optionally verify object exists already
proceed
else
error condition
This seems easier than inducing a self-imposed sleep which may or may not yield this race condition anyway.
-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