Skip to content

v3.1.0

Latest
Compare
Choose a tag to compare
@drakenclimber drakenclimber released this 28 Jul 20:57
· 139 commits to main since this release
v3.1.0

Github Releases (by Release)

NOTE - this release is not guaranteed to be backward compatible with previous releases

Libcgroup v3.1.0 adds systemd support to the libcgroup library. Users can now create
systemd scopes via the libcgroup C APIs, command line tools, and (experimental) Python
bindings. These scopes can be "delegated" (or not), which is systemd parlance for a
cgroup hierarchy that is being managed by another entity. Systemd will not modify
settings or processes within a delegated hierarchy.

Note that libcgroup v3.1.0 is still capable of modifying cgroups and processes anywhere
in the cgroup hierarchy, including the root cgroup and its children (which are owned
by systemd). Modifying cgroups and processes owned by systemd is a violation of the
cgroup single-writer rule, and systemd reserves the right to undo any changes made by
other processes. The libcgroup team strongly discourages modifying systemd-managed
cgroups - especially on production systems - but it can be useful during prototyping
and on experimental systems.

Three libcgroup/systemd examples have been added to the repository:

If you do not utilize systemd, libcgroup will still operate as before. Our continuous
integration is setup to ensure the library compiles and runs without systemd support,
but testing is currently limited. Please open an issue in our Github if you have any
problems or questions. (And, of course, pull requests are always welcome.)

ChangeLog

  • Version 3.1.0 - July 28, 2023
    • Add systemd C APIs
    • Add systemd support to all command line tools, including cgcreate, cgconfigparser,
      cgexec, and cgclassify. Note the usage of the -b flag in many tools to ignore
      the default systemd hierarchy and operate from the root of the cgroup hierarchy
    • Add python systemd APIs
    • Improved handling of legacy (cgroup v1), hybrid (v1/v2), and unified (v2) cgroup
      hierarchies
    • Add several new C APIs, including:
      • cg_setup_mode_t() - A function that returns the current cgroup setup mode (legacy,
        hybrid, or unified)
      • Various functions for better traversal through a struct cgroup
      • cgroup_create_scope() and cgroup_create_scope2() for creating systemd scopes
    • cgconfigparser now supports a systemd section
    • Libcgroup python bindings have matured greatly but are still considered experimental
      and subject to change. Community feedback here would be greatly appreciated
      • Add rudimentary logging support
      • Add systemd support
      • Add setup mode (legacy, hybrid, unified) support
      • Add several APIs for operating on struct cgroup in a Pythonic manner
      • Add methods for moving processes within cgroups
    • Rename blacklist to denylist
    • Rename whitelist to allowlist
    • Add many functional tests