Commit 683ecc0
committed
Do not untrack resources of a server being unshelved
This patch concerns the time when a VM is being unshelved and the
compute manager set the task_state to spawning, claimed resources of
the VM and then called driver.spawn(). So the instance is in vm_state
SHELVED_OFFLOADED, task_state spawning.
If at this point a new update_available_resource periodic job is
started that collects all the instances assigned to the node to
calculate resource usage. However the calculation assumed that a
VM in SHELVED_OFFLOADED state does not need resource allocation on
the node (probably being removed from the node as it is offloaded)
and deleted the resource claim.
Given all this we ended up with the VM spawned successfully but having
lost the resource claim on the node.
This patch changes what we do in vm_state SHELVED_OFFLOADED, task_state
spawning. We no longer delete the resource claim in this state and
keep tracking the resource in stats.
Change-Id: I8c9944810c09d501a6d3f60f095d9817b756872d
Closes-Bug: #2025480
(cherry picked from commit f1dc4ec)
(cherry picked from commit 4239d1f)1 parent 23c190a commit 683ecc0
File tree
6 files changed
+38
-12
lines changed- nova
- compute
- tests
- functional/regressions
- unit/compute
6 files changed
+38
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6918 | 6918 | | |
6919 | 6919 | | |
6920 | 6920 | | |
6921 | | - | |
6922 | | - | |
6923 | | - | |
| 6921 | + | |
| 6922 | + | |
| 6923 | + | |
6924 | 6924 | | |
6925 | 6925 | | |
6926 | 6926 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1539 | 1539 | | |
1540 | 1540 | | |
1541 | 1541 | | |
1542 | | - | |
| 1542 | + | |
| 1543 | + | |
1543 | 1544 | | |
1544 | 1545 | | |
1545 | 1546 | | |
| |||
1598 | 1599 | | |
1599 | 1600 | | |
1600 | 1601 | | |
1601 | | - | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
1602 | 1605 | | |
1603 | 1606 | | |
1604 | 1607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 78 | | |
81 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 85 | + | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
211 | 227 | | |
212 | 228 | | |
213 | 229 | | |
| |||
0 commit comments