Skip to content

fix(cli/clistat): read from alternate cgroup path #8591

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

Merged
merged 1 commit into from
Jul 19, 2023
Merged

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jul 19, 2023

  • Attempts reading cgroupv1 quota, period, usage from /sys/fs/cgroup/cpu,cpuacct by default
  • Fall back to /sys/fs/cgroup/cpu for v1 quota and period
  • Fall back to /sys/fs/cgroup/cpuacct for v1 usage

Fixes #8468

An alternative approach I considered was simply searching for the relevant paths under /sys/fs/cgroup at runtime.

@johnstcn johnstcn self-assigned this Jul 19, 2023
@johnstcn johnstcn requested review from mafredri and mtojek July 19, 2023 12:15
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bpmct
Copy link
Member

bpmct commented Jul 19, 2023

Does this also fix #8416 and #8592?

@johnstcn
Copy link
Member Author

Does this also fix #8416 and #8592?

No, those are different issues.

@johnstcn johnstcn merged commit 0965a2d into main Jul 19, 2023
@johnstcn johnstcn deleted the cj/clistat-altpath branch July 19, 2023 15:25
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coder stat cpu fails in docker workspace
4 participants