Skip to content

Conversation

@troglobit
Copy link
Contributor

Description

Add support for configurable CPU and memory limits on containers.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

 - Improved cgroup support, including subgroup delegation.
 - Drop previously backported patch.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Add resource-limit and resource-usage containers to YANG model.  Podman,
and later conmon, enforce CPU and memory limits in a delegated cgroupsv2
hierarchy managed by Finit.

Resource usage is queried from 'podman inspect', which has more nodes
than what is currently possible to limit.

Requires Finit 4.15, or later.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit troglobit requested a review from mattiaswal December 18, 2025 08:18
Copy link
Contributor

@mattiaswal mattiaswal left a comment

Choose a reason for hiding this comment

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

Look sine 👍 just a minor comment

}
}

container resource-limit {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indentation.

Copy link
Contributor Author

@troglobit troglobit Dec 22, 2025

Choose a reason for hiding this comment

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

I've checked this now, the indentation of the additions in this file match the rest of this file. Maybe you saw something on in the diff view due to how GitHub displays tabs? This came up in an earlier review too and then I found that GitHub has changed the default from 8 to 4. I've set up my profile to use 8 char tabs: https://github.com/settings/appearance#tab-size-preference

Our YANG files are usually indented with leading spaces (2 per level), and for each 8 spaces they are replaced by a tab character. This is what Emacs yang-mode does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants