Commit 35112d7
committed
Handle instance = None in _local_delete_cleanup
Change I4d3193d8401614311010ed0e055fcb3aaeeebaed added some
additional local delete cleanup to prevent leaking of placement
allocations. The change introduced a regression in our "delete while
booting" handling as the _local_delete_cleanup required a valid
instance object to do its work and in two cases, we could have
instance = None from _lookup_instance if we are racing with a create
request and the conductor has deleted the instance record while we
are in the middle of processing the delete request.
This handles those scenarios by doing two things:
(1) Changing the _local_delete_cleanup and
_update_queued_for_deletion methods to take an instance UUID
instead of a full instance object as they really only need the
UUID to do their work
(2) Saving a copy of the instance UUID before doing another instance
lookup which might return None and passing that UUID to the
_local_delete_cleanup and _update_queued_for_deletion methods
Closes-Bug: #1914777
Change-Id: I03cf285ad83e09d88cdb702a88dfed53c01610f8
(cherry picked from commit 123f626)1 parent 4f17ea2 commit 35112d7
File tree
3 files changed
+29
-36
lines changed- nova
- compute
- tests
- functional/regressions
- unit/compute
3 files changed
+29
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2179 | 2179 | | |
2180 | 2180 | | |
2181 | 2181 | | |
2182 | | - | |
| 2182 | + | |
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
2186 | 2186 | | |
2187 | | - | |
| 2187 | + | |
2188 | 2188 | | |
2189 | 2189 | | |
2190 | | - | |
| 2190 | + | |
2191 | 2191 | | |
2192 | 2192 | | |
2193 | | - | |
| 2193 | + | |
2194 | 2194 | | |
2195 | 2195 | | |
2196 | 2196 | | |
2197 | | - | |
| 2197 | + | |
2198 | 2198 | | |
2199 | 2199 | | |
2200 | 2200 | | |
| |||
2231 | 2231 | | |
2232 | 2232 | | |
2233 | 2233 | | |
2234 | | - | |
| 2234 | + | |
2235 | 2235 | | |
2236 | 2236 | | |
2237 | 2237 | | |
| |||
2240 | 2240 | | |
2241 | 2241 | | |
2242 | 2242 | | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
2243 | 2248 | | |
2244 | 2249 | | |
2245 | 2250 | | |
| |||
2250 | 2255 | | |
2251 | 2256 | | |
2252 | 2257 | | |
2253 | | - | |
| 2258 | + | |
2254 | 2259 | | |
2255 | 2260 | | |
2256 | 2261 | | |
2257 | | - | |
| 2262 | + | |
2258 | 2263 | | |
2259 | 2264 | | |
2260 | 2265 | | |
| |||
2267 | 2272 | | |
2268 | 2273 | | |
2269 | 2274 | | |
2270 | | - | |
| 2275 | + | |
2271 | 2276 | | |
2272 | 2277 | | |
2273 | 2278 | | |
| |||
2311 | 2316 | | |
2312 | 2317 | | |
2313 | 2318 | | |
2314 | | - | |
| 2319 | + | |
2315 | 2320 | | |
2316 | 2321 | | |
2317 | 2322 | | |
| |||
2496 | 2501 | | |
2497 | 2502 | | |
2498 | 2503 | | |
2499 | | - | |
| 2504 | + | |
2500 | 2505 | | |
2501 | 2506 | | |
2502 | 2507 | | |
| |||
2505 | 2510 | | |
2506 | 2511 | | |
2507 | 2512 | | |
2508 | | - | |
| 2513 | + | |
2509 | 2514 | | |
2510 | 2515 | | |
2511 | 2516 | | |
| |||
2517 | 2522 | | |
2518 | 2523 | | |
2519 | 2524 | | |
2520 | | - | |
| 2525 | + | |
2521 | 2526 | | |
2522 | 2527 | | |
2523 | 2528 | | |
| |||
2527 | 2532 | | |
2528 | 2533 | | |
2529 | 2534 | | |
2530 | | - | |
| 2535 | + | |
2531 | 2536 | | |
2532 | 2537 | | |
2533 | 2538 | | |
| |||
2580 | 2585 | | |
2581 | 2586 | | |
2582 | 2587 | | |
2583 | | - | |
| 2588 | + | |
2584 | 2589 | | |
2585 | 2590 | | |
2586 | 2591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 81 | + | |
| 82 | + | |
90 | 83 | | |
91 | 84 | | |
92 | 85 | | |
| |||
119 | 112 | | |
120 | 113 | | |
121 | 114 | | |
122 | | - | |
| 115 | + | |
123 | 116 | | |
124 | 117 | | |
125 | 118 | | |
126 | 119 | | |
127 | 120 | | |
128 | 121 | | |
129 | 122 | | |
130 | | - | |
| 123 | + | |
131 | 124 | | |
132 | 125 | | |
133 | 126 | | |
| |||
142 | 135 | | |
143 | 136 | | |
144 | 137 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 138 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4211 | 4211 | | |
4212 | 4212 | | |
4213 | 4213 | | |
4214 | | - | |
| 4214 | + | |
4215 | 4215 | | |
4216 | 4216 | | |
4217 | 4217 | | |
| |||
4252 | 4252 | | |
4253 | 4253 | | |
4254 | 4254 | | |
4255 | | - | |
| 4255 | + | |
4256 | 4256 | | |
4257 | 4257 | | |
4258 | 4258 | | |
| |||
5971 | 5971 | | |
5972 | 5972 | | |
5973 | 5973 | | |
5974 | | - | |
| 5974 | + | |
| 5975 | + | |
5975 | 5976 | | |
5976 | 5977 | | |
5977 | 5978 | | |
| |||
0 commit comments