From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id B959C1FF13E for ; Fri, 20 Mar 2026 10:53:58 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4B77E12A39; Fri, 20 Mar 2026 10:54:12 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 20 Mar 2026 10:53:37 +0100 Message-Id: To: "Daniel Kral" , Subject: Re: [PATCH ha-manager v2 01/10] rename static node stats to be consistent with similar interfaces From: "Daniel Kral" X-Mailer: aerc 0.21.0-38-g7088c3642f2c-dirty References: <20260319164047.642936-1-d.kral@proxmox.com> <20260319164047.642936-2-d.kral@proxmox.com> In-Reply-To: <20260319164047.642936-2-d.kral@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774000374084 X-SPAM-LEVEL: Spam detection results: 0 AWL -1.012 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.408 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.819 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.903 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: KZEFTV66EWFBIN4N4E5KURSM6DKF222M X-Message-ID-Hash: KZEFTV66EWFBIN4N4E5KURSM6DKF222M X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 { > =20 > my $stats =3D $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. > =20 > - 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 = $@; > } > =20