Repository navigation
Commit d9ea9b8
Fix defects found in review of per-offering overcommit
Two of these made the branch worse than what it replaced.
An exempt VM was not charged for what it holds. The ratio was recorded on
the VM only when it differed from 1, so an offering asking for a ratio of
1 in a cluster overcommitted ten times recorded nothing, and the charge
fell back to the cluster's ratio - a tenth of what the VM occupies. The
memory pinning still applied, so the host really did hold the memory it
was not charged for.
- record the ratio whenever it differs from the cluster's, which is
exactly when the charge needs it
Memory reclaim was disabled on every VM of every default installation.
The trigger was "the resolved ratio is 1", and clusters ship with a ratio
of 1, so every guest would have lost free page reporting at its next
start on installations that opted into nothing.
- trigger on the offering having explicitly asked, not on the resolved
value happening to be 1
Capacity checks asked in different units to the charge. An offering that
overrides its cluster's ratio occupies a different share of a host than
its size suggests, but the allocator and the planner still asked for the
unscaled size. A VM could pass the check and then fail to start, and
hosts were ranked on the wrong numbers.
- scale the request wherever room is checked, resolved from the
offering since the VM has not started yet
Also: an unreadable ratio no longer breaks a start or silently skips a
refund.
Tests: 13 new cases for what gets recorded on the VM and when reclaim is
turned off, including the two cases above.
Signed-off-by: Brad House <bhouse@nexthop.ai>1 parent 866a37e commit d9ea9b8
7 files changed
Lines changed: 323 additions & 33 deletions
File tree
- engine
- components-api/src/main/java/com/cloud/capacity
- orchestration/src
- main/java/com/cloud/vm
- test/java/com/cloud/vm
- server/src
- main/java/com/cloud
- capacity
- deploy
- test/java/com/cloud/capacity
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
165 | 171 | | |
166 | 172 | | |
167 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
| 1863 | + | |
| 1864 | + | |
1863 | 1865 | | |
1864 | | - | |
1865 | | - | |
1866 | | - | |
1867 | | - | |
| 1866 | + | |
| 1867 | + | |
1868 | 1868 | | |
1869 | | - | |
1870 | | - | |
1871 | | - | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
1872 | 1875 | | |
1873 | 1876 | | |
1874 | 1877 | | |
1875 | 1878 | | |
1876 | 1879 | | |
1877 | 1880 | | |
1878 | | - | |
1879 | | - | |
| 1881 | + | |
| 1882 | + | |
1880 | 1883 | | |
1881 | | - | |
| 1884 | + | |
1882 | 1885 | | |
1883 | 1886 | | |
1884 | | - | |
| 1887 | + | |
1885 | 1888 | | |
1886 | 1889 | | |
1887 | | - | |
| 1890 | + | |
1888 | 1891 | | |
1889 | 1892 | | |
1890 | 1893 | | |
1891 | 1894 | | |
1892 | 1895 | | |
1893 | 1896 | | |
1894 | | - | |
| 1897 | + | |
1895 | 1898 | | |
1896 | 1899 | | |
1897 | 1900 | | |
1898 | 1901 | | |
1899 | 1902 | | |
1900 | | - | |
| 1903 | + | |
1901 | 1904 | | |
1902 | 1905 | | |
1903 | 1906 | | |
1904 | 1907 | | |
1905 | | - | |
1906 | | - | |
1907 | | - | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
1908 | 1917 | | |
1909 | | - | |
1910 | | - | |
| 1918 | + | |
| 1919 | + | |
1911 | 1920 | | |
1912 | 1921 | | |
1913 | 1922 | | |
| |||
1917 | 1926 | | |
1918 | 1927 | | |
1919 | 1928 | | |
1920 | | - | |
1921 | | - | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
1922 | 1936 | | |
1923 | | - | |
| 1937 | + | |
| 1938 | + | |
1924 | 1939 | | |
1925 | | - | |
1926 | | - | |
1927 | | - | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
1928 | 1943 | | |
1929 | | - | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
1930 | 1947 | | |
1931 | 1948 | | |
1932 | 1949 | | |
1933 | 1950 | | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
1934 | 1959 | | |
1935 | 1960 | | |
1936 | 1961 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
0 commit comments