Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/proc/diskstats: Handle cgroup2 #653

Open
AlexanderS opened this issue Jun 21, 2024 · 1 comment
Open

/proc/diskstats: Handle cgroup2 #653

AlexanderS opened this issue Jun 21, 2024 · 1 comment
Labels
Bug Confirmed to be a bug Easy Good for new contributors

Comments

@AlexanderS
Copy link

AlexanderS commented Jun 21, 2024

Required information

  • Distribution:
    • Debian GNU/Linux 11 (bullseye)
    • Linux 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux
  • LXCFS version: 4.0.7

Issue description

With cgroup2 the disk io stats are not virtulized. Looking at the code in https://github.com/lxc/lxcfs/blob/main/src/proc_fuse.c#L579 it seems, that only blkio controller of cgroup1 is handled.

cgroup2 seems to provide the required information in /sys/fs/cgroup/lxc.payload.<container name>/io.stat.

@AlexanderS AlexanderS changed the title /proc/diskstats not virtulized for cgroup2 /proc/diskstats not virtualized for cgroup2 Jun 22, 2024
@stgraber stgraber changed the title /proc/diskstats not virtualized for cgroup2 /proc/diskstats: Handle cgroup2 Sep 15, 2024
@stgraber stgraber added Bug Confirmed to be a bug Easy Good for new contributors labels Sep 15, 2024
@stgraber
Copy link
Member

I can't easily tell if there was a good reason that this wasn't done for cgroup2.

But in any case, if it's doable with the information exposed by cgroup2, then we should use that.
If it's not, then LXCFS should render an empty file instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug Easy Good for new contributors
Development

No branches or pull requests

2 participants