Commit ee181da
committed
Calculate memory_mb_max_unit based on instance's memory_mb
Previously the memory_mb_max_unit was relying on the
overallMemoryUsage reported by the ESXi, which was wrong, because
the host could still have a big VM with reserved memory, that was
not consuming any RAM and thus not reflected in the memory usage.
We are now looking for the instances spawned on that ESXi and
subtract their configured memory_mb from the total RAM capacity
of the host, resulting in a realistic memory_mb_max_unit.
Change-Id: I72821c97d80f9f675dca943d65f94e36824d81b61 parent 0e9c005 commit ee181da
File tree
3 files changed
+60
-8
lines changed- nova
- tests/unit/virt/vmwareapi
- virt/vmwareapi
3 files changed
+60
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2377 | 2377 | | |
2378 | 2378 | | |
2379 | 2379 | | |
2380 | | - | |
2381 | | - | |
| 2380 | + | |
| 2381 | + | |
2382 | 2382 | | |
2383 | 2383 | | |
2384 | 2384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
409 | 412 | | |
410 | 413 | | |
411 | 414 | | |
| |||
414 | 417 | | |
415 | 418 | | |
416 | 419 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | 420 | | |
423 | 421 | | |
424 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
4808 | 4809 | | |
4809 | 4810 | | |
4810 | 4811 | | |
| 4812 | + | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
| 4818 | + | |
| 4819 | + | |
| 4820 | + | |
| 4821 | + | |
| 4822 | + | |
| 4823 | + | |
| 4824 | + | |
| 4825 | + | |
| 4826 | + | |
| 4827 | + | |
| 4828 | + | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
| 4857 | + | |
| 4858 | + | |
| 4859 | + | |
| 4860 | + | |
| 4861 | + | |
| 4862 | + | |
| 4863 | + | |
| 4864 | + | |
0 commit comments