Runit support for LXCFS (Closes #1087185).
Hi Mathias, Lorenzo, Andrew.
Regarding debian bug #1087185 lxcfs: runit service dir for lxcfs I finally came around to have a first go at runit support for LXCFS.
This is still the legacy way of using dh_runit
such as used in openssh-server
package. Lorenzo aims to bring up the newer way used in runit-services
package, but to get going I decided to go by what I can do at the moment. I am willing to assist changing this to the newer way which goes through /usr/share/runit/sv
instead of installing the service sv
directory directly into /etc/sv
– whether it will become ready for Trixie or later.
I have tested this change by removing manually installed runit support on my server, building the package and installing the package. lxcfs is running via runit:
% ps aux | grep "[l]xcfs"
root 1631 0.0 0.0 2440 1268 ? Ss 17:43 0:00 runsv lxcfs
_runit-+ 1649 0.0 0.0 2588 1432 ? S 17:43 0:00 svlogd -tt -b 2048 /var/log/runit/lxcfs
root 1651 0.0 0.0 227684 2684 ? Sl 17:43 0:00 /usr/bin/lxcfs -f /var/lib/lxcfs
It appears to be happy, excerpt from /var/log/runit/lxcfs/current
:
2025-02-20_16:43:19.68450 Starting LXCFS at /usr/bin/lxcfs
2025-02-20_16:43:19.68806 Ignoring invalid max threads value 4294967295 > max (100000).
2025-02-20_16:43:19.69858 Using runtime path /run
2025-02-20_16:43:19.69860 Running lxcfslib_init to reload liblxcfs
2025-02-20_16:43:19.71338 mount namespace: 7
2025-02-20_16:43:19.71339 hierarchies:
2025-02-20_16:43:19.71340 0: fd: 8: cpuset,cpu,io,memory,hugetlb,pids,rdma,misc
2025-02-20_16:43:19.71341 Kernel supports pidfds
2025-02-20_16:43:19.71343 Kernel does not support swap accounting
2025-02-20_16:43:19.71343 api_extensions:
2025-02-20_16:43:19.71344 - cgroups
2025-02-20_16:43:19.71344 - sys_cpu_online
2025-02-20_16:43:19.71344 - proc_cpuinfo
2025-02-20_16:43:19.71346 - proc_diskstats
2025-02-20_16:43:19.71346 - proc_loadavg
2025-02-20_16:43:19.71347 - proc_meminfo
2025-02-20_16:43:19.71347 - proc_stat
2025-02-20_16:43:19.71348 - proc_swaps
2025-02-20_16:43:19.71348 - proc_uptime
2025-02-20_16:43:19.71349 - proc_slabinfo
2025-02-20_16:43:19.71349 - shared_pidns
2025-02-20_16:43:19.71349 - cpuview_daemon
2025-02-20_16:43:19.71350 - loadavg_daemon
2025-02-20_16:43:19.71362 - pidfds
@gibmat please do not merge this yet. I first like to have Lorenzo and Andrew if he is willing have a review at it. Of course please also review. I will follow up with a comment about a question I have. I am intending to follow up with Incus runit support next. However despite I can build lxcfs package with git-build-package and cowbuilder just fine and installs build dependencies there, it still does not install build dependencies with incus package, but I follow up about this there.