13677
|
|
|
Stavitsky A |
8 years ago
|
|
|
13676
|
|
|
Jenkins |
8 years ago
|
|
|
13675
|
|
|
Jenkins |
8 years ago
|
|
|
13674
|
|
|
Jenkins |
8 years ago
|
|
|
13673
|
|
|
Jenkins |
8 years ago
|
|
|
13672
|
|
|
Jenkins |
8 years ago
|
|
|
13671
|
|
|
Jenkins |
8 years ago
|
|
|
13670
|
|
|
Jenkins |
8 years ago
|
|
|
13669
|
|
Reduce window for allocate_fixed_ip / release_fixed_ip race in nova-net
There is a race during allocate_fixed_ip where a new instance, B, is associated with a fixed IP, X, which was previously associated with instance A that is being deallocated.
Between the time that instance A is associated with fixed IP X and the time that it's VIF is allocated, and fip.allocated = True in the DB, the dhcpagent callback hits release_fixed_ip for the fixed IP X from when instance A was deallocating.
release_fixed_ip checks to see if the instance is allocated and if not it disassociates the instance, which was associated with new instance B.
This leads to get_instance_nw_info() not building anything since there are no fixed IPs associated with instance A in the database, so eventually anything needing to do networking with instance A, like assocating a floating IP, fails.
To narrow the race, we do the VIF allocation before associating the fixed IP to the new instance. This does not completely fix the bug, but it's a tactical change that we can backport to stable branches while working on the longer-term fix which is going to involve network RPC API changes to release_fixed_ip().
Note that test_vpn_allocate_fixed_ip_no_network_id is removed since it no longer works and arguably was testing the DB API in the wrong place, so a new test is added to test_db_api for the same coverage.
Partial-Bug: #1249065
Change-Id: I8cf5483982085da57ee470fa2753b0d0aebc12b3 (cherry picked from commit 3736c120cbeacbc4349efbda99e279cddfb5f09e)
|
Matt Riedemann |
8 years ago
|
|
|
13668
|
|
|
Jenkins |
8 years ago
|
|
|
13667
|
|
|
Jenkins |
8 years ago
|
|
|
13666
|
|
|
Vincent Untz |
8 years ago
|
|
|
13665
|
|
|
Jenkins |
8 years ago
|
|
|
13664
|
|
|
Jenkins |
8 years ago
|
|
|
13663
|
|
|
sridhargaddam |
8 years ago
|
|
|
13662
|
|
|
Lan Qi song |
8 years ago
|
|
|
13661
|
|
|
Jenkins |
8 years ago
|
|
|
13660
|
|
|
Jenkins |
8 years ago
|
|
|
13659
|
|
|
Jenkins |
8 years ago
|
|
|
13658
|
|
|
Jenkins |
8 years ago
|
|
|