4 ms·
This article sent me down a rabbit-hole about device cgroup rules, since the concept was foreign to me. Bottom line here is that these rules look cryptic becau
by pragma_x 2y ago
This article sent me down a rabbit-hole about device cgroup rules, since the concept was foreign to me.
Bottom line here is that these rules look cryptic because they map to device _numbers and types_ as enumerated by the kernel. Some like `/dev/sda` translating to `b 8:0` are probably going to be consistent between different Linuxes. The rest? I have no idea.
The rule syntax is what the kernel itself uses, so that isn't Docker's fault. Still, I would love to be able to say `/dev/sda rwm` instead of `b 8:0 rwm`, by letting the Docker daemon automate the path-to-cgroup-rule translation. It would be far more docker-compose friendly. Even better, like for the sake of this article, would be to have known semantic names like 'gpu', '3daccelerator', and 'primarystorage'. Anything to make docker-compose files more useful to other people.
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/devices.html https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1...
- leonheld 2y ago> Some like `/dev/sda` translating to `b 8:0` are probably going to be consistent between different Linuxes. This is well documented for Linux https://www.kernel.org/doc/Documentation/admin-guide/devices.txt https://www.kernel.org/doc/Documentation/admin-guide/devices.... The real issue happes when vendors get a bit too creative and don't plan on upstreaming their drivers.