Fix: Fixed an issue where balancing was performed in combination of deactivated balancing and dry-run mode

Fixes: #248
This commit is contained in:
Florian Paul Azim Hoberg
2025-06-24 10:06:28 +02:00
parent f4ed8d9928
commit 6b2e120739
3 changed files with 6 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
fixed:
- Fixed an issue where balancing was performed in combination of deactivated balancing and dry-run mode (@gyptazy). [#248]

View File

@@ -0,0 +1 @@
date: TBD

View File

@@ -87,8 +87,9 @@ def main():
Helper.log_node_metrics(proxlb_data, init=False)
# Perform balancing actions via Proxmox API
if not cli_args.dry_run or not proxlb_data["meta"]["balancing"].get("enable", False):
Balancing(proxmox_api, proxlb_data)
if proxlb_data["meta"]["balancing"].get("enable", False):
if not cli_args.dry_run:
Balancing(proxmox_api, proxlb_data)
# Validate if the JSON output should be
# printed to stdout