[pve-devel] [PATCH pve-container 3/3] cgroup: get_subdir: return cgroupv2 path for undef controller

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Nov 24 11:45:41 CET 2020


On Fri, Oct 30, 2020 at 10:42:28AM +0100, Alexandre Derumier wrote:
> ---
>  src/PVE/LXC/CGroup.pm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/PVE/LXC/CGroup.pm b/src/PVE/LXC/CGroup.pm
> index 19562c2..74d84c4 100644
> --- a/src/PVE/LXC/CGroup.pm
> +++ b/src/PVE/LXC/CGroup.pm
> @@ -35,6 +35,7 @@ sub get_subdir {
>      my $path = $entry->{$kind};
>  
>      return $path if defined $path;
> +    return "/lxc/$self->{vmid}" if !$controller;

Why exactly are you doing this? `get_cgroup_path` should work with an
undef $controller value. Also, this ignores the $limiting parameter (and
the main point for using the command socket was to not hardcode paths at
all)
So what kind of problem did you run into there?

>  
>      $path = PVE::LXC::Command::get_cgroup_path(
>  	$self->{vmid},
> -- 
> 2.20.1





More information about the pve-devel mailing list