From: Daniel Kral <d.kral@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH-SERIES ha-manager v2 00/10] include non-HA resources in usage accounting
Date: Thu, 19 Mar 2026 17:33:50 +0100 [thread overview]
Message-ID: <20260319164047.642936-1-d.kral@proxmox.com> (raw)
This series is split out from [0] to make the static/dynamic load
balancer series a little more straight forward to reason through.
This series adds any running non-HA resource into the existing basic and
static usage scheduler accounting to base decisions on the usage of the
whole cluster instead of just the HA resources.
For clusters where every guest is configured as a HA resource nothing
should change.
I tested a few simple cases in a 3 node cluster for both the basic and
static usage which are variations of:
- 1 running HA resource on each node, starting them on any node (with
homogeneous nodes and guests) will rebalance them on the
alphabetically first node as before
- 1 running HA resource on node1, running 3 non-HA resources on node2,
starting another HA resource on node1 will rebalance it to node3
- 3 non-HA resources on node1, starting a HA resource on node1 will
rebalance it to node2
- non-running HA and non-HA resources are excluded from the usage
accounting
- starting non-HA resources doesn't have any effect obviously
[0] https://lore.proxmox.com/pve-devel/20260217141437.584852-1-d.kral@proxmox.com/
Daniel Kral (10):
rename static node stats to be consistent with similar interfaces
resources: remove redundant load_config fallback for static config
remove redundant service_node and migration_target parameter
factor out common pve to ha resource type mapping
derive static service stats while filling the service stats repository
test: make static service usage explicit for all resources
make static service stats indexable by sid
move static service stats repository to PVE::HA::Usage::Static
usage: augment service stats with node and state information
include running non-HA resources in the scheduler's accounting
src/PVE/HA/Config.pm | 8 +-
src/PVE/HA/Env.pm | 16 ++--
src/PVE/HA/Env/PVE2.pm | 81 +++++++++++++------
src/PVE/HA/Manager.pm | 16 +++-
src/PVE/HA/Resources.pm | 4 +-
src/PVE/HA/Resources/PVECT.pm | 7 +-
src/PVE/HA/Resources/PVEVM.pm | 7 +-
src/PVE/HA/Sim/Env.pm | 16 ++--
src/PVE/HA/Sim/Hardware.pm | 56 ++++++++-----
src/PVE/HA/Sim/Resources.pm | 17 ----
src/PVE/HA/Tools.pm | 23 ++++--
src/PVE/HA/Usage.pm | 12 ++-
src/PVE/HA/Usage/Basic.pm | 6 +-
src/PVE/HA/Usage/Static.pm | 43 +++-------
.../hardware_status | 6 +-
.../hardware_status | 6 +-
.../hardware_status | 10 +--
.../hardware_status | 6 +-
.../static_service_stats | 52 +++++++++++-
.../hardware_status | 6 +-
.../static_service_stats | 9 ++-
src/test/test-crs-static1/hardware_status | 6 +-
src/test/test-crs-static2/hardware_status | 10 +--
src/test/test-crs-static3/hardware_status | 6 +-
src/test/test-crs-static4/hardware_status | 6 +-
src/test/test-crs-static5/hardware_status | 6 +-
26 files changed, 260 insertions(+), 181 deletions(-)
--
2.47.3
next reply other threads:[~2026-03-19 16:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 16:33 Daniel Kral [this message]
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-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=20260319164047.642936-1-d.kral@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