[pve-devel] [PATCH v2 manager 4/5] cluster resources: add cgroup-mode to node properties

Fiona Ebner f.ebner at proxmox.com
Wed Nov 2 13:24:42 CET 2022


> diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
> index eac953df..61de8b36 100755
> --- a/PVE/Service/pvestatd.pm
> +++ b/PVE/Service/pvestatd.pm
> @@ -123,9 +123,25 @@ my $generate_rrd_string = sub {
>      return join(':', map { $_ // 'U' } @$data);
>  };
>  
> +my sub broadcast_cgroup_mode {
> +    my $cgroup_mode = eval { PVE::CGroup::cgroup_mode(); };
> +    if (my $err = $@) {
> +	syslog('err', "cgroup mode error: $err");
> +	return;
> +    }
> +
> +    my $old = PVE::Cluster::get_node_kv("cgroup-mode", $cgroup_mode, $nodename);

The second parameter here is wrong, sorry!

Since the static node information like CPU core count and total memory
is intended to be similarly broadcast, it might even be better to
generalize the kv entry to "static-info", which includes cgroup mode as
well as CPU+memory info.





More information about the pve-devel mailing list