Mount cpu,cpuacct group in Rhel8
Authored-by: Ning Wu
@@ -17,20 +17,25 @@ mount_cgroups() {
local basedir=$CGROUP_BASEDIR
local options=rw,nosuid,nodev,noexec,relatime
local groups="cpuset blkio cpuacct cpu memory"
+ local rhel8_groups="cpuset blkio cpu,cpuacct memory"
if [ "$CGROUP_AUTO_MOUNTED" ]; then
# nothing to do as cgroup is already automatically mounted
return
fi
+ if [ "$TEST_OS" = rhel8 ]; then
ssh -t $gpdb_host_alias sudo bash -ex <<EOF
mkdir -p $basedir
mount -t tmpfs tmpfs $basedir
- for group in $groups; do
+ for group in $rhel8_groups; do
mkdir -p $basedir/\$group
mount -t cgroup -o $options,\$group cgroup $basedir/\$group
done
+ ln -s $basedir/cpu,cpuacct $basedir/cpu
+ ln -s $basedir/cpu,cpuacct $basedir/cpuacct
EOF
+ fi
}
make_cgroups_dir() {
