Commit c3a0969
Omit resource inventories from placement update if zero
When a compute node has zero total available for the:
* MEMORY_MB
* DISK_GB
* VGPU
* PMEM_NAMESPACE_*
resource classes, we attempt to PUT an inventory with 'total' of 0
which isn't allowed by the placement API. Doing this results in a 400
error from placement "JSON does not validate: 0 is less than the
minimum of 1" and ResourceProviderUpdateFailed and
ResourceProviderSyncFailed raised in nova.
We are already omitting most resource classes when their total amount
of the resource is 0 and we just need to also do it for the
aforementioned resource classes.
Closes-Bug: #1901120
Closes-Bug: #1906494
Change-Id: I022f3bbddbbdc24362b10004f273da2421788c97
(cherry picked from commit 0b942dc)1 parent 8fab5fc commit c3a0969
File tree
2 files changed
+72
-13
lines changed- nova
- tests/unit/virt/libvirt
- virt/libvirt
2 files changed
+72
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21177 | 21177 | | |
21178 | 21178 | | |
21179 | 21179 | | |
| 21180 | + | |
| 21181 | + | |
| 21182 | + | |
| 21183 | + | |
| 21184 | + | |
| 21185 | + | |
| 21186 | + | |
| 21187 | + | |
| 21188 | + | |
| 21189 | + | |
| 21190 | + | |
| 21191 | + | |
| 21192 | + | |
| 21193 | + | |
| 21194 | + | |
| 21195 | + | |
| 21196 | + | |
| 21197 | + | |
| 21198 | + | |
| 21199 | + | |
| 21200 | + | |
| 21201 | + | |
| 21202 | + | |
| 21203 | + | |
| 21204 | + | |
| 21205 | + | |
| 21206 | + | |
| 21207 | + | |
| 21208 | + | |
| 21209 | + | |
| 21210 | + | |
| 21211 | + | |
| 21212 | + | |
| 21213 | + | |
| 21214 | + | |
| 21215 | + | |
| 21216 | + | |
| 21217 | + | |
| 21218 | + | |
| 21219 | + | |
| 21220 | + | |
| 21221 | + | |
| 21222 | + | |
| 21223 | + | |
| 21224 | + | |
| 21225 | + | |
| 21226 | + | |
| 21227 | + | |
21180 | 21228 | | |
21181 | 21229 | | |
21182 | 21230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7786 | 7786 | | |
7787 | 7787 | | |
7788 | 7788 | | |
7789 | | - | |
7790 | | - | |
| 7789 | + | |
| 7790 | + | |
| 7791 | + | |
| 7792 | + | |
7791 | 7793 | | |
7792 | 7794 | | |
7793 | 7795 | | |
7794 | 7796 | | |
7795 | 7797 | | |
7796 | 7798 | | |
7797 | | - | |
7798 | | - | |
| 7799 | + | |
7799 | 7800 | | |
7800 | 7801 | | |
7801 | 7802 | | |
| |||
7836 | 7837 | | |
7837 | 7838 | | |
7838 | 7839 | | |
7839 | | - | |
7840 | | - | |
7841 | | - | |
7842 | | - | |
7843 | | - | |
7844 | | - | |
7845 | | - | |
7846 | | - | |
7847 | | - | |
| 7840 | + | |
| 7841 | + | |
| 7842 | + | |
| 7843 | + | |
| 7844 | + | |
| 7845 | + | |
| 7846 | + | |
| 7847 | + | |
| 7848 | + | |
| 7849 | + | |
| 7850 | + | |
7848 | 7851 | | |
7849 | 7852 | | |
7850 | 7853 | | |
| |||
7879 | 7882 | | |
7880 | 7883 | | |
7881 | 7884 | | |
| 7885 | + | |
| 7886 | + | |
| 7887 | + | |
| 7888 | + | |
7882 | 7889 | | |
7883 | 7890 | | |
7884 | 7891 | | |
| |||
7991 | 7998 | | |
7992 | 7999 | | |
7993 | 8000 | | |
| 8001 | + | |
| 8002 | + | |
| 8003 | + | |
| 8004 | + | |
7994 | 8005 | | |
7995 | 8006 | | |
7996 | 8007 | | |
| |||
0 commit comments