Skip to main content
Flexible Top Header

We have run into a situation where our virtual compute provisioning stack is experiencing duplicate IP assignments from Bluecat.  They are POSTing to the v2 API endpoint /api/v2/networks/{collection}/addresses without specifying an address, allowing BAM to allocate the next available.  When multiple requests are submitted in quick succession (within the same second) for the same network, BAM sometimes returns the same IP to both requests with an HTTP 201 code, causing the provisioning automation to assign the same IP to multiple VMs.

Other than single-threading the provisioning (which is problematic if different stacks of provisioning automation are provisioning on the same networks) - are there any thoughts of how to avoid this and has anyone else run into it?  This is supposedly confirmed as a defect and there was originally a recommendation to use the v1 assignNextAvailableIP4Address call instead - but when I pushed for assurance that this call would not suffer from the same susceptibility to race condition that the v2 call did the recommendation was withdrawn.

We’re running 9.5.2, and I’ve not been told that this issue is any different in any other versions.

Would suggest raising an issue with Care on this one Tim …. If it was 25.1 I would recommend using the Available addresses endpoint and provision the selected IP, but I’ll see if I can cause a race condition in my lab with that route


Thanks, Brian.  I opened case 377169 on this.  It was confirmed a defect, KI 26587.  They suggested using v1 assignNextAvailableIP4Address as a workaround but were unable to articulate why that would not suffer the same flaw, only that it’s been around longer and no one has reported it.

 

On the availableAddresses endpoint since you have to make 2 calls (one to find an available IP, then a post to /networks/{collection/addresses to assign it, yes?) wouldn’t that increase the window for a race?  I also have a case open on that endpoint, case 377178, KI 26594, because a non-admin with READ permission to the network gets an empty set back when calling it.