Labels with vim
When you open a file with vim and save it, vim creates a copy of it and replace the original by the copy, and the label on the file can be lost.
chsmack command to relabel the file.
Redpak handles cgroups only in pure v2 version. If you are in cgroup v1 or hybrid, you need to reboot by appending to the command line:
After reboot, you can check that `/sys/fs/cgroup’ is in v2 with:
mount -l | grep /sys/fs/cgroup cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
If you don’t have right to create a sub cgroup into your current parent cgroup, it may be due to the fact that your not in a user cgroup session.
You can try to start one with:
systemd-run --user --pty -p "Delegate=yes" bash
If you don’t manage to write into some controllers, it may be due to a issue in delegation. For that, you need to verify from /sys/fs/cgroup to your parent cgroup (
cat /proc/self/cgroup), the available controllers
cat cgroup.controllers and the delegated controllers to their children
A temporary way to test it, is to append the missing ones at each level, for example:
echo "+cpuset +cpu +memory +io +pids" > cgroup.subtree_control
After you can check that in child, you have them in controllers
# in child cat cgroup.controllers
Issue writing into controllers
All of the elements of redpak config file respects kernel definitions, please have a look at https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html.