[GH-ISSUE #27] Script crashes when run on fresh installation without any HA enabled vm #20

Open
opened 2026-02-26 17:46:08 +03:00 by kerem · 1 comment
Owner

Originally created by @labkeeper on GitHub (May 11, 2024).
Original GitHub issue: https://github.com/cvk98/Proxmox-load-balancer/issues/27

As title says, when I run script in cluster of 3 fresh machines, 3 vms on one of them, no vm has HA enabled./

INFO | START ***Load-balancer!***
Traceback (most recent call last):
  File "/usr/local/Proxmox-load-balancer/./plb.py", line 494, in <module>
    main()
  File "/usr/local/Proxmox-load-balancer/./plb.py", line 464, in main
    cluster = Cluster(server_url)
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Proxmox-load-balancer/./plb.py", line 95, in __init__
    self.cl_nodes: dict = self.cluster_hosts()  # All cluster nodes
                          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Proxmox-load-balancer/./plb.py", line 167, in cluster_hosts
    self.master_node = rr.json()['data']['manager_status']['master_node']
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'master_node'
Originally created by @labkeeper on GitHub (May 11, 2024). Original GitHub issue: https://github.com/cvk98/Proxmox-load-balancer/issues/27 As title says, when I run script in cluster of 3 fresh machines, 3 vms on one of them, no vm has HA enabled./ ```root@pve1:/usr/local/Proxmox-load-balancer# ./plb.py INFO | START ***Load-balancer!*** Traceback (most recent call last): File "/usr/local/Proxmox-load-balancer/./plb.py", line 494, in <module> main() File "/usr/local/Proxmox-load-balancer/./plb.py", line 464, in main cluster = Cluster(server_url) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/Proxmox-load-balancer/./plb.py", line 95, in __init__ self.cl_nodes: dict = self.cluster_hosts() # All cluster nodes ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/Proxmox-load-balancer/./plb.py", line 167, in cluster_hosts self.master_node = rr.json()['data']['manager_status']['master_node'] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^ KeyError: 'master_node' ```
Author
Owner

@cvk98 commented on GitHub (May 12, 2024):

You need to turn off the "run only on the masternode" in the config

<!-- gh-comment-id:2106344698 --> @cvk98 commented on GitHub (May 12, 2024): You need to turn off the "run only on the masternode" in the config
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#20
No description provided.