From: "Daniel Kral" <d.kral@proxmox.com>
To: "Daniel Kral" <d.kral@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH ha-manager v2 01/10] rename static node stats to be consistent with similar interfaces
Date: Fri, 20 Mar 2026 10:53:37 +0100 [thread overview]
Message-ID: <DH7INX1480CZ.3SDKLJF4M6WZU@proxmox.com> (raw)
In-Reply-To: <20260319164047.642936-2-d.kral@proxmox.com>
On Thu Mar 19, 2026 at 5:33 PM CET, Daniel Kral wrote:
> diff --git a/src/PVE/HA/Usage/Static.pm b/src/PVE/HA/Usage/Static.pm
> index d586b603..395be871 100644
> --- a/src/PVE/HA/Usage/Static.pm
> +++ b/src/PVE/HA/Usage/Static.pm
> @@ -33,10 +33,10 @@ sub add_node {
>
> my $stats = $self->{'node-stats'}->{$nodename}
> or die "did not get static node usage information for '$nodename'\n";
> - die "static node usage information for '$nodename' missing cpu count\n" if !$stats->{cpus};
> - die "static node usage information for '$nodename' missing memory\n" if !$stats->{memory};
> + die "static node usage information for '$nodename' missing cpu count\n" if !$stats->{maxcpu};
> + die "static node usage information for '$nodename' missing memory\n" if !$stats->{maxmem};
@Dominik pointed this out to me off-list: even though it's unlikely that
the node max stats will ever be exactly 0, this should be a
!defined($stats->{...}) rather than a !$stats->{...}.
This was existent, so I'd send a follow-up instead of re-sending the
series to minimize noise on the list.
>
> - eval { $self->{scheduler}->add_node($nodename, int($stats->{cpus}), int($stats->{memory})); };
> + eval { $self->{scheduler}->add_node($nodename, int($stats->{maxcpu}), int($stats->{maxmem})); };
> die "initializing static node usage for '$nodename' failed - $@" if $@;
> }
>
next prev parent reply other threads:[~2026-03-20 9:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 16:33 [PATCH-SERIES ha-manager v2 00/10] include non-HA resources in usage accounting Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 01/10] rename static node stats to be consistent with similar interfaces Daniel Kral
2026-03-20 9:53 ` Daniel Kral [this message]
2026-03-19 16:33 ` [PATCH ha-manager v2 02/10] resources: remove redundant load_config fallback for static config Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 03/10] remove redundant service_node and migration_target parameter Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 04/10] factor out common pve to ha resource type mapping Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 05/10] derive static service stats while filling the service stats repository Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 06/10] test: make static service usage explicit for all resources Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 07/10] make static service stats indexable by sid Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 08/10] move static service stats repository to PVE::HA::Usage::Static Daniel Kral
2026-03-19 16:33 ` [PATCH ha-manager v2 09/10] usage: augment service stats with node and state information Daniel Kral
2026-03-19 16:34 ` [PATCH ha-manager v2 10/10] include running non-HA resources in the scheduler's accounting Daniel Kral
2026-03-19 16:56 ` [PATCH-SERIES ha-manager v2 00/10] include non-HA resources in usage accounting Daniel Kral
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DH7INX1480CZ.3SDKLJF4M6WZU@proxmox.com \
--to=d.kral@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox