From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 9A3A41FF13A for ; Wed, 29 Apr 2026 10:49:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A59A722F87; Wed, 29 Apr 2026 10:49:37 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 29 Apr 2026 10:49:32 +0200 Message-Id: Subject: Re: [PATCH pve-ha-manager 6/7] api: status: add load imbalance to status From: "Dominik Rusovac" To: "Daniel Kral" , X-Mailer: aerc 0.20.0 References: <20260427132031.220468-1-d.rusovac@proxmox.com> <20260427132031.220468-7-d.rusovac@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777452475062 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.421 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [status.pm] Message-ID-Hash: 6WF7BTSJJDI5KW3PRKBO47LI7X2DEGOR X-Message-ID-Hash: 6WF7BTSJJDI5KW3PRKBO47LI7X2DEGOR X-MailFrom: d.rusovac@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 Tue Apr 28, 2026 at 11:10 AM CEST, Daniel Kral wrote: > On Mon Apr 27, 2026 at 3:20 PM CEST, Dominik Rusovac wrote: >> This is a very basic measure to enable users to detect the prevailing >> load imbalance in the UI, which atm reveals nothing about the latter. >> >> imo, enabling users to track how the load imbalance changed over time >> (using RRD graphs, for example) should be considered, in the long run. >> >> Signed-off-by: Dominik Rusovac >> --- >> src/PVE/API2/HA/Status.pm | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/src/PVE/API2/HA/Status.pm b/src/PVE/API2/HA/Status.pm >> index 4894f3b..acec78e 100644 >> --- a/src/PVE/API2/HA/Status.pm >> +++ b/src/PVE/API2/HA/Status.pm >> @@ -199,7 +199,9 @@ __PACKAGE__->register_method({ >> } >> my $datacenter_config =3D eval { cfs_read_file('datacenter.= cfg') } // {}; >> if (my $crs =3D $datacenter_config->{crs}) { >> - $extra_status .=3D " - $crs->{ha} load CRS" >> + $extra_status .=3D >> + " - $crs->{ha} load CRS " >> + . sprintf("(load imbalance: %.2f", 100 * $status->{= imbalance}) . "%)" >> if $crs->{ha} && $crs->{ha} ne 'basic'; > > I think this should also check whether the load balancing system is > enabled to not clutter the status string if it's unused or no action is > taken if this value is high, but no hard feelings. > good point, thx! will adjust the clause >> } >> my $time_str =3D localtime($status->{timestamp});