Skip to content

fix cgroupsv1 support in warden#563

Open
mkocher wants to merge 1 commit intoubuntu-jammyfrom
jammy-fix-cgroupsv1
Open

fix cgroupsv1 support in warden#563
mkocher wants to merge 1 commit intoubuntu-jammyfrom
jammy-fix-cgroupsv1

Conversation

@mkocher
Copy link
Copy Markdown
Member

@mkocher mkocher commented Apr 16, 2026

The new error checking was finding errors. Going back to the old code which did not check for errors but did work for teams. Jammy-on-Jammy -on-Garden is a pretty niche use case these days, so this seems ok.

Fixes #562

The new error checking was finding errors. Going back to the old code
which did not check for errors but did work for teams. Jammy-on-Jammy
-on-Garden is a pretty niche use case these days, so this seems ok.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

Walkthrough

The changes refactor cgroup type detection in monit access helpers. A new helper function monit_using_unified_cgroup_v2() was added to detect cgroup v2 by checking for /sys/fs/cgroup/cgroup.controllers or validating the filesystem type of /sys/fs/cgroup. The detection logic in permit_monit_access() was updated to use this helper instead of grepping /proc/self/cgroup. Additionally, error handling for empty cgroup v1 values was removed, and the control flow in restrict-monit-api-access was updated to depend on the new helper function.

Suggested reviewers

  • aramprice
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix cgroupsv1 support in warden' directly corresponds to the main change: reverting error-checking logic for cgroupsv1 support by implementing improved cgroup v2 detection and removing problematic error validation in the v1 branch.
Description check ✅ Passed The pull request description clearly explains the motivation for reverting error-checking logic and references the specific GitHub issue being addressed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jammy-fix-cgroupsv1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rkoster
Copy link
Copy Markdown
Contributor

rkoster commented Apr 17, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-project-automation github-project-automation bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Merge | Prioritized

Development

Successfully merging this pull request may close these issues.

Warden CPI cannot create VMs using the Ubuntu Jammy 1.1143 Warden Stemcell

3 participants