Commit ad7ed7a
committed
Merge pull request #847 from kishankavala/CLOUDSTACK-8880
Bug-ID: CLOUDSTACK-8880: calculate free memory on host before deploying Vm. free memory = total memory - (all vm memory)With memory over-provisioning set to 1, when mgmt server starts VMs in parallel on one host, then the memory allocated on that kvm can be larger than the actual physcial memory of the kvm host.
Fixed by checking free memory on host before starting Vm.
Added test case to check memory usage on Host.
Verified Vm deploy on Host with enough capacity and also without capacity
* pr/847:
Bug-ID: CLOUDSTACK-8880: calculate free memory on host before deploying Vm. free memory = total memory - (all vm memory)
Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>File tree
3 files changed
+96
-3
lines changed- plugins/hypervisors/kvm
- src/com/cloud/hypervisor/kvm/resource
- wrapper
- test/com/cloud/hypervisor/kvm/resource
3 files changed
+96
-3
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| |||
2453 | 2454 | | |
2454 | 2455 | | |
2455 | 2456 | | |
| 2457 | + | |
2456 | 2458 | | |
2457 | 2459 | | |
2458 | 2460 | | |
| |||
3586 | 3588 | | |
3587 | 3589 | | |
3588 | 3590 | | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
3589 | 3595 | | |
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
63 | 75 | | |
64 | 76 | | |
65 | 77 | | |
| |||
68 | 80 | | |
69 | 81 | | |
70 | 82 | | |
71 | | - | |
72 | | - | |
73 | 83 | | |
74 | 84 | | |
75 | 85 | | |
| |||
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
153 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
Lines changed: 59 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4855 | 4855 | | |
4856 | 4856 | | |
4857 | 4857 | | |
| 4858 | + | |
4858 | 4859 | | |
4859 | 4860 | | |
4860 | 4861 | | |
| |||
4868 | 4869 | | |
4869 | 4870 | | |
4870 | 4871 | | |
| 4872 | + | |
4871 | 4873 | | |
4872 | 4874 | | |
4873 | 4875 | | |
| |||
4927 | 4929 | | |
4928 | 4930 | | |
4929 | 4931 | | |
| 4932 | + | |
4930 | 4933 | | |
4931 | 4934 | | |
4932 | 4935 | | |
| |||
4940 | 4943 | | |
4941 | 4944 | | |
4942 | 4945 | | |
| 4946 | + | |
4943 | 4947 | | |
4944 | 4948 | | |
4945 | 4949 | | |
| |||
4989 | 4993 | | |
4990 | 4994 | | |
4991 | 4995 | | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
| 5005 | + | |
| 5006 | + | |
| 5007 | + | |
| 5008 | + | |
| 5009 | + | |
| 5010 | + | |
| 5011 | + | |
| 5012 | + | |
| 5013 | + | |
| 5014 | + | |
| 5015 | + | |
| 5016 | + | |
| 5017 | + | |
| 5018 | + | |
| 5019 | + | |
| 5020 | + | |
| 5021 | + | |
| 5022 | + | |
| 5023 | + | |
| 5024 | + | |
| 5025 | + | |
| 5026 | + | |
| 5027 | + | |
| 5028 | + | |
| 5029 | + | |
| 5030 | + | |
| 5031 | + | |
| 5032 | + | |
| 5033 | + | |
| 5034 | + | |
| 5035 | + | |
| 5036 | + | |
| 5037 | + | |
| 5038 | + | |
| 5039 | + | |
| 5040 | + | |
| 5041 | + | |
| 5042 | + | |
| 5043 | + | |
| 5044 | + | |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
| 5049 | + | |
| 5050 | + | |
4992 | 5051 | | |
4993 | 5052 | | |
4994 | 5053 | | |
| |||
0 commit comments