cvk98 / Proxmox-load-balancer

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

Update plb.py #15

Closed Mrgove10 closed 9 months ago

Mrgove10 commented 11 months ago

Added the reset if local_disk & local_resource after the check in order to not block the complete script

cvk98 commented 11 months ago

a few lines above, the local_disk & local_resource variables are assigned the current values. Are you sure you need to reset them as you suggest? Your offer won't break anything. But I'm not sure if it's necessary

Mrgove10 commented 11 months ago

The issue i was facing yesterday was the folowwing. I have 10 LXC + 1VM in my setup. This VM has a USB atached to it. It would start with trying to migrate the VM, says it can not be move (because of the USB) and then, since the variables are not reset, the LXCs could not migrate. Another option is mabey changing the scope of the local_disk & local_resources to be in the loop not at the start of the function. Today i do not seam to be able to reproduce this bug.

cvk98 commented 9 months ago

Thanks for the comment. I have accepted your correction.