Commit 439ae51
test/ctr.bats: fix wrt new CPU units to weight conversion
It's a long story (see [1], [2], [3], [4]) but both runc and crun is
changing the formula to convert cgroup v1 CPU shares to cgroup v2 CPU
weight, and it causes a failure in "ctr update resources" test, because
it relies on the old conversion formula.
Let's modify it so it works either the old or the new conversion.
(Ultimately, with cgroup v2 we should switch to setting
unified.cpu.weight directly).
[1]: kubernetes/kubernetes#131216
[2]: opencontainers/runc#4772
[3]: opencontainers/cgroups#20
[4]: containers/crun#1767
Signed-off-by: Kir Kolyshkin <[email protected]>1 parent d9321ae commit 439ae51
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
873 | | - | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
874 | 876 | | |
875 | 877 | | |
876 | 878 | | |
| |||
897 | 899 | | |
898 | 900 | | |
899 | 901 | | |
900 | | - | |
901 | | - | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
902 | 906 | | |
903 | 907 | | |
904 | 908 | | |
| |||
0 commit comments