cvk98 / Proxmox-load-balancer

Designed to constantly maintain the Proxmox cluster in balance
GNU General Public License v3.0
185 stars 22 forks source link

Add HA group consideration #29

Open pin-chen opened 4 months ago

pin-chen commented 4 months ago
kjj2 commented 4 months ago

This fails if you have any VMs that aren't assigned to a group in HA. Simple fix:

@@ -255,6 +255,8 @@
         for item in temp:
             if item['type'] != 'service':
                 continue
+            if "group" not in item:
+                continue

             # sid example: vm:134
             vm_id = int(item['sid'].split(':')[1])