ggiamarchi / vagrant-openstack-provider

Use Vagrant to manage OpenStack Cloud instances.
MIT License
245 stars 102 forks source link

Fix deadlock for parallel `vagrant up` #345

Closed ggiamarchi closed 6 years ago

ggiamarchi commented 6 years ago

When some floating IP are allocated but unused and when floating_ip_pool_always_allocate = false this can lead into a situation where several servers are trying to use the same IP address and it leads into a deadlock because they all wait to have the IP assigned and of course only one of them can have it.

The mutex have to be at a higher level than it was to ensure floating IP assignment to be well done in an atomic way.

Of course, doing that, floating IP assignment does not occurs in parallel anymore but it looks to be the only way to solve the problem.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 87.1% when pulling 1b67a220880d7553f6b19dde2ead7301cb55c4a1 on fix-parallel-race-condition into 56181bc75233346aeac3043ea15054663338fdca on master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 87.1% when pulling 6f645bccf4747071b5a206bbeb143bbacd59d99c on fix-parallel-race-condition into 56181bc75233346aeac3043ea15054663338fdca on master.