Merge pull request #38 from BSWANG/master

fix cpu controller not set in cgroup v2
This commit is contained in:
Bingshen Wang
2023-01-30 19:29:09 +08:00
committed by GitHub

View File

@@ -1,10 +1,10 @@
#!/bin/bash
echo $CGROUP_MODE
if [[ ! -z $CGROUP_MODE ]] && [[ $CGROUP_MODE =~ .*[v,V]2.* ]]; then
echo "set cgroup mode to $CGROUP_MODE"
if ! grep -q 'systemd.unified_cgroup_hierarchy=1' /etc/default/grub; then
grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=1"
grubby --update-kernel=ALL --args="cgroup_no_v1=all"
fi
fi