From: "Daniel Kral" <d.kral@proxmox.com>
To: "Dominik Rusovac" <d.rusovac@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH pve-ha-manager v2 5/6] api: status: add load imbalance to status
Date: Thu, 30 Apr 2026 09:46:45 +0200 [thread overview]
Message-ID: <DI6BN49TYRHP.27AEYKE3D1XL9@proxmox.com> (raw)
In-Reply-To: <20260429122051.179485-6-d.rusovac@proxmox.com>
On Wed Apr 29, 2026 at 2: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 <d.rusovac@proxmox.com>
> ---
>
> Notes:
> changes since v1:
> * check whether load balancing system is enabled
> * binding $crs->{ha} to $mode
>
> src/PVE/API2/HA/Status.pm | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/API2/HA/Status.pm b/src/PVE/API2/HA/Status.pm
> index 4894f3b..8dadff3 100644
> --- a/src/PVE/API2/HA/Status.pm
> +++ b/src/PVE/API2/HA/Status.pm
> @@ -199,8 +199,11 @@ __PACKAGE__->register_method({
> }
> my $datacenter_config = eval { cfs_read_file('datacenter.cfg') } // {};
> if (my $crs = $datacenter_config->{crs}) {
> - $extra_status .= " - $crs->{ha} load CRS"
> - if $crs->{ha} && $crs->{ha} ne 'basic';
> + my $mode = $crs->{ha};
> + $extra_status .=
> + " - $mode load CRS "
> + . sprintf("(load imbalance: %.2f", 100 * $status->{imbalance}) . "%)"
> + if $crs->{'ha-auto-rebalance'} && $mode && $mode ne 'basic';
Sorry, I missed that bit in the previous review, but this should be
something like
my $mode = $crs->{ha};
$extra_status .= " $mode load CRS" if $mode && $mode ne 'basic';
$extra_status .=
sprintf(" (load imbalance: %.2f", 100 * $status->{imbalance}) . " %)"
if $crs->{'ha-auto-rebalance'} && $mode && $mode ne 'basic';
Otherwise the CRS mode wouldn't be visible anymore if auto rebalancing
is not enabled.
> }
> my $time_str = localtime($status->{timestamp});
> my $status_text = "$master ($status_str, $time_str)$extra_status";
next prev parent reply other threads:[~2026-04-30 7:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 12:20 [RFC PATCH-SERIES cluster/ha-manager/manager/proxmox v2 0/6] clamp load imbalance to unit interval Dominik Rusovac
2026-04-29 12:20 ` [PATCH proxmox v2 1/6] resource-scheduling: clamp imbalance value " Dominik Rusovac
2026-04-30 7:48 ` Daniel Kral
2026-04-30 8:33 ` Dominik Rusovac
2026-04-29 12:20 ` [PATCH pve-manager v2 2/6] ui: from/CRSOptions: add maximum for threshold Dominik Rusovac
2026-04-29 12:20 ` [PATCH pve-ha-manager v2 3/6] test: re-adjust logged imbalance values to corrected calculation Dominik Rusovac
2026-04-29 12:20 ` [PATCH pve-ha-manager v2 4/6] manager: add load imbalance to status Dominik Rusovac
2026-04-29 12:20 ` [PATCH pve-ha-manager v2 5/6] api: status: " Dominik Rusovac
2026-04-30 7:46 ` Daniel Kral [this message]
2026-04-30 8:21 ` Dominik Rusovac
2026-04-29 12:20 ` [PATCH pve-cluster v2 6/6] datacenter config: add maxima for load scheduler options Dominik Rusovac
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=DI6BN49TYRHP.27AEYKE3D1XL9@proxmox.com \
--to=d.kral@proxmox.com \
--cc=d.rusovac@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.