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 option to run ProxLB only on the Proxmox's master node in the cluster. #43

Closed gyptazy closed 1 month ago

gyptazy commented 1 month ago

feature: Add option to run ProxLB only on the Proxmox's master node in the cluster.

General

Tests

Running on a different node:

<6> ProxLB: Info: [logger]: Logger verbosity got updated to: INFO.
<4> ProxLB: Warning: [api-connection]: API connection does not verify SSL certificate.
<6> ProxLB: Info: [api-connection]: API connection succeeded to host: 10.10.10.211.
<6> ProxLB: Info: [cluster-master-getter]: Getting master node from cluster.
<6> ProxLB: Info: [cluster-master-getter]: Master node: virt03
<6> ProxLB: Info: [cluster-master-validator]: Node executor hostname is: dev-nfs01
<6> ProxLB: Info: [cluster-master-validator]: dev-nfs01 is not the cluster master (virt03).
<6> ProxLB: Info: [daemon]: Running in daemon mode. Next run in 24 hours.

Running on the master node:

<6> ProxLB: Info: [logger]: Logger verbosity got updated to: INFO.
<4> ProxLB: Warning: [api-connection]: API connection does not verify SSL certificate.
<6> ProxLB: Info: [api-connection]: API connection succeeded to host: 10.10.10.211.
<6> ProxLB: Info: [cluster-master-getter]: Getting master node from cluster.
<6> ProxLB: Info: [cluster-master-getter]: Master node: virt03
<6> ProxLB: Info: [cluster-master-validator]: Node executor hostname is: virt03
<6> ProxLB: Info: [cluster-master-validator]: virt03 is the cluster master (virt03).
<6> ProxLB: Info: [node-statistics]: Added node virt02.
<6> ProxLB: Info: [node-statistics]: Added node virt01.
<6> ProxLB: Info: [node-statistics]: Added node virt03.
<6> ProxLB: Info: [node-statistics]: Created node statistics.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [vm-statistics]: Added vm test08-fat01.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-include-exclude-tags]: Got PLB include group.
<4> ProxLB: Warn: [vm-statistics]: Rebalancing on LXC containers (CT) always requires them to shut down.
<4> ProxLB: Warn: [vm-statistics]: gyp02 is from type CT and cannot be live migrated!
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-include-exclude-tags]: Got PLB include group.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [vm-statistics]: Added vm test05.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<4> ProxLB: Warn: [vm-statistics]: Rebalancing on LXC containers (CT) always requires them to shut down.
<4> ProxLB: Warn: [vm-statistics]: ct-fat is from type CT and cannot be live migrated!
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [vm-statistics]: Added vm test06-gyptazy01.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [vm-statistics]: Added vm test09-fat02.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [api-get-vm-include-exclude-tags]: Got PLB include group.
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<4> ProxLB: Warn: [vm-statistics]: Rebalancing on LXC containers (CT) always requires them to shut down.
<4> ProxLB: Warn: [vm-statistics]: gyp01 is from type CT and cannot be live migrated!
<6> ProxLB: Info: [api-get-vm-tags]: Got VM/CT tag from API.
<6> ProxLB: Info: [vm-statistics]: Created VM statistics.
<4> ProxLB: Warning: [node-update-statistics]: Node virt01 is overprovisioned for memory by 137%.
<4> ProxLB: Warning: [node-update-statistics]: Node virt03 is overprovisioned for memory by 103%.
<4> ProxLB: Warning: [node-update-statistics]: Node virt03 is overprovisioned for disk by 128%.
<6> ProxLB: Info: [node-update-statistics]: Updated node resource assignments by all VMs.
<6> ProxLB: Info: [balancing-method-validation]]: Valid balancing method: memory
<6> ProxLB: Info: [balancing-mode-validation]]: Valid balancing method: used
<6> ProxLB: Info: [balanciness-validation]: Rebalancing for memory is not needed. Highest usage: 66% | Lowest usage: 61%.
<6> ProxLB: Info: [rebalancing-calculator]: Balancing calculations done.
<6> ProxLB: Info: [rebalancing-executor]: No rebalancing needed.
<6> ProxLB: Info: [cli-output-generator-dry-run]: Starting dry-run to rebalance vms to their new nodes.
<6> ProxLB: Info: [cli-output-generator-dry-run]: No rebalancing needed.
<6> ProxLB: Info: [post-validations]: All post-validations succeeded.
<6> ProxLB: Info: [daemon]: Not running in daemon mode. Quitting.

Notes

Requested by: @wkleinhenz Fixes: #40

gyptazy commented 1 month ago

Extended tests passed, pipeline for flake8 fixed.

merging....