(I am using openstack4j to talk to OpenStack via REST API)
I would like to reuse some of the unassigned floating IPs allocated in my tenant (allocate to newly provisioned servers). However, it seems that addFloatingIp
action makes no difference between assigning unused floating IP and reassigning it from server to server.
I would like to automate the process but I am afraid of following race condition: one client check particular IP is free and before it manages to associate it with server A, other client associate it with server B. From the perspective of the second client, the associated floating IP can be removed in any later point after successfully associated.
Is there any better way?