[pve-devel] applied-series: [PATCH container+pvestatd 00/20] updates for lxc4 and cgroupv2
Thomas Lamprecht
t.lamprecht at proxmox.com
Sat Apr 4 20:22:03 CEST 2020
On 4/3/20 4:37 PM, w.bumiller at proxmox.com wrote:
> 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.
>
applied series, rust seems to make one re ally change their coding practices
a bit, while yours weren't bad before in any way at all it still feels like
the code is more documented (in a meaning full way, not like in a
`$a = $a +1; # increase $a` way).
Anyway, had minor comments on two patches, both for cgroupv2, also did a
followup fixing some typos in the LXC::Command and LXC::CGroup modules.
Plus the dependency version bump for pve-common, as it was kept backward
compatible a Break from the other direction wasn't required.
I guess for the cgroupv2 stuff we (=you ;P) need to iron some small
wrinkles anyway, as the v1 wasn't affected I decided to push it out now.
Thanks!
> 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
>
More information about the pve-devel
mailing list