[GH-ISSUE #20] Proxmox 8.1 VE #10

Closed
opened 2026-02-26 17:46:06 +03:00 by kerem · 2 comments
Owner

Originally created by @iz4tow on GitHub (Feb 16, 2024).
Original GitHub issue: https://github.com/cvk98/Proxmox-load-balancer/issues/20

Goog morning.
I'm trying your script on Proxmox VE 8.1 and it's not working.
Here the result

Traceback (most recent call last):
  File "/home/test/./plb.py", line 494, in <module>
    main()
  File "/home/test/./plb.py", line 464, in main
    cluster = Cluster(server_url)
  File "/home/test/./plb.py", line 95, in __init__
    self.cl_nodes: dict = self.cluster_hosts()  # All cluster nodes
  File "/home/test/./plb.py", line 167, in cluster_hosts
    self.master_node = rr.json()['data']['manager_status']['master_node']
KeyError: 'master_node'

Here the config file:

# KEEP THE MARGINS AND FILE STRUCTURE!!!
# Proxmox node address and authorization information
proxmox:
  url:
    ip: 192.168.100.101
    port: 8006
  auth:
    username: 'root@pam'
    password: 'Password123!'

# Balancing Parameters
parameters:
  deviation: 4             # Percentage of allowable deviation of the RAM load of the node
  threshold: 90            # Percentage of maximum load
  lxc_migration: OFF       # Container migration (LXCs are rebooted during migration!!!)
  migration_timeout: 1000  # For the future
  only_on_master: OFF      # Only run PLB on the current cluster master

# List of exclusions
exclusions:
  vms: []    # Example: [100] or [100, 101, 102, 113, 125, 131] or ["100-200", 300, 301]
  nodes: []  # Example: [px-3] or [px-3, px-4, px-8, px-9]

# Loguru settings
logging_level: 'INFO'  # You can choose 'DEBUG" or "INFO" or "WARNING" or "ERROR"

# Mail settings
mail:
  sending: OFF # ON or OFF (Enables/disables sending email)
  message_subject: 'Load-balancer notification'
  from: 'user@domain.com'
  to: 'admin@domain.com'
  login: 'user' # Login options: login, domain\login, login@domain.com
  password: 'MAIL_PASSWORD'
  server:
    address: 'mx.domain.com' # IP or address of your mail server
    port: 25
  ssl_tls: OFF # ON or OFF

# Others
Gigabyte: 1073741824 # 1e+9 for 10^9
Terabyte: 1099511627776 # 1e+12 for 10^12

Thanls

Originally created by @iz4tow on GitHub (Feb 16, 2024). Original GitHub issue: https://github.com/cvk98/Proxmox-load-balancer/issues/20 Goog morning. I'm trying your script on Proxmox VE 8.1 and it's not working. Here the result ``` Traceback (most recent call last): File "/home/test/./plb.py", line 494, in <module> main() File "/home/test/./plb.py", line 464, in main cluster = Cluster(server_url) File "/home/test/./plb.py", line 95, in __init__ self.cl_nodes: dict = self.cluster_hosts() # All cluster nodes File "/home/test/./plb.py", line 167, in cluster_hosts self.master_node = rr.json()['data']['manager_status']['master_node'] KeyError: 'master_node' ``` Here the config file: ``` # KEEP THE MARGINS AND FILE STRUCTURE!!! # Proxmox node address and authorization information proxmox: url: ip: 192.168.100.101 port: 8006 auth: username: 'root@pam' password: 'Password123!' # Balancing Parameters parameters: deviation: 4 # Percentage of allowable deviation of the RAM load of the node threshold: 90 # Percentage of maximum load lxc_migration: OFF # Container migration (LXCs are rebooted during migration!!!) migration_timeout: 1000 # For the future only_on_master: OFF # Only run PLB on the current cluster master # List of exclusions exclusions: vms: [] # Example: [100] or [100, 101, 102, 113, 125, 131] or ["100-200", 300, 301] nodes: [] # Example: [px-3] or [px-3, px-4, px-8, px-9] # Loguru settings logging_level: 'INFO' # You can choose 'DEBUG" or "INFO" or "WARNING" or "ERROR" # Mail settings mail: sending: OFF # ON or OFF (Enables/disables sending email) message_subject: 'Load-balancer notification' from: 'user@domain.com' to: 'admin@domain.com' login: 'user' # Login options: login, domain\login, login@domain.com password: 'MAIL_PASSWORD' server: address: 'mx.domain.com' # IP or address of your mail server port: 25 ssl_tls: OFF # ON or OFF # Others Gigabyte: 1073741824 # 1e+9 for 10^9 Terabyte: 1099511627776 # 1e+12 for 10^12 ``` Thanls
kerem closed this issue 2026-02-26 17:46:06 +03:00
Author
Owner

@cvk98 commented on GitHub (Feb 16, 2024):

It's strange that no one has complained before you. Try to create a HA group. It is not necessary to use its capabilities. Just create it. The second option is to choose version 0,5,2. There is no such functionality, as well as some improvements, however.

<!-- gh-comment-id:1948531519 --> @cvk98 commented on GitHub (Feb 16, 2024): It's strange that no one has complained before you. Try to create a HA group. It is not necessary to use its capabilities. Just create it. The second option is to choose version 0,5,2. There is no such functionality, as well as some improvements, however.
Author
Owner

@iz4tow commented on GitHub (Feb 16, 2024):

Sorry. It was totally my fault.
It was a very stupid error on configuration...

In this test environment I forgot that HA was enabled!
Now, with only_on_master ON is working.

Great job

<!-- gh-comment-id:1948808845 --> @iz4tow commented on GitHub (Feb 16, 2024): Sorry. It was totally my fault. It was a very stupid error on configuration... In this test environment I forgot that HA was enabled! Now, with only_on_master ON is working. Great job
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxmox-load-balancer#10
No description provided.