gyptazy / ProxLB

ProxLB - (Re)Balance VM Workloads Across Nodes in Proxmox Clusters. A Load Balancer for Proxmox - and more!
https://proxlb.de
GNU General Public License v3.0
138 stars 6 forks source link

feature: Add new mode_option to rebalance by node's bytes or percent. #34

Closed gyptazy closed 1 month ago

gyptazy commented 1 month ago

feature: Add new mode_option to rebalance by node's bytes or percent.

General

This adds the requested (by @ewenlau) option to to rebalance by the node's free resources in percent instead of bytes. The operation mode for this can be changed by the newly introduced option mode_option which is by default bytes.

A user can define this by setting bytes or percent.

This PR also adds a function to validate if there are objects of type VM or CT to rebalance to avoid raising a stack trace when no objects are present in a cluster (e.g. freshly installed cluster).

Fixes: #29