[pve-devel] [PATCH container+pvestatd 00/20] updates for lxc4 and cgroupv2

w.bumiller at proxmox.com w.bumiller at proxmox.com
Fri Apr 3 16:37:20 CEST 2020


From: Wolfgang Bumiller <w.bumiller at proxmox.com>

This is a larger patch set with the following goals:
* initial work for cgroupv2 support
* fewer hardcoded cgroup paths (required for cgroupv2 support)
* fewer patches on top of lxc
  - This includes dropping the 'lxcnetaddbr' configuration patch and
    adding that as a config variable explicitly.
    The apparmor profile patch on the lxc side is still included, but we don't
    use that profile anymore, that's for people explicitly overriding it.
    (same for getent)
  - The namespace separation has another chance of moving upstream, in a
    slightly different way this time. For now I don't expect it to
    impact the cgroup layout for us (much).

This also includes an lxc command socket client to more easily fetch
cgroup paths (and in the future this might replace a few lxc utility
run_command()s as well).

Note that the lxc-4 related configuration keys in the 2nd-to-last patch
are still subject to change, but the code should not affect
installations running lxc3 anyway.

Wolfgang Bumiller (20):
  add Delegate flag to pve-container at .service
  add PVE::LXC::{CGroup, Command} submodules
  pct: use CGroup submodule and new CpuSet methods
  update_lxc_config: cgroupv2 support
  cgroup: add get_io_stats and parse_nested_keyed_file
  use CGroup::get_io_stats
  cgroup: add get_cpu_stat
  use CGroup::get_cpu_stat
  cgroup: add get_memory_stat
  use CGroup::get_memory_stat
  cgroup: add change_memory_limit
  use CGroup::change_memory_limit
  cgroup: add change_cpu_quota, change_cpu_shares
  use CGroup::change_cpu_{shares,quota}
  cleanup unused functions
  add helper to get the lxc version
  add upscript (lxcnetaddbr) to container lxc config
  pve-container at .service: switch to foreground mode
  handle cgroup related changes of lxc-4.0
  cleanup cgroups in pre-start hook

 src/PVE/CLI/pct.pm         |  20 +-
 src/PVE/LXC.pm             | 166 +++++++--------
 src/PVE/LXC/CGroup.pm      | 412 +++++++++++++++++++++++++++++++++++++
 src/PVE/LXC/Command.pm     | 196 ++++++++++++++++++
 src/PVE/LXC/Config.pm      |  42 ++--
 src/PVE/LXC/Makefile       |   2 +
 src/lxc-pve-prestart-hook  |  49 +++++
 src/pve-container at .service |  14 +-
 8 files changed, 769 insertions(+), 132 deletions(-)
 create mode 100644 src/PVE/LXC/CGroup.pm
 create mode 100644 src/PVE/LXC/Command.pm

-- 
2.20.1





More information about the pve-devel mailing list