Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: anti-affinity not working #123

Open
ybizeul opened this issue Dec 1, 2024 · 3 comments
Open

Bug: anti-affinity not working #123

ybizeul opened this issue Dec 1, 2024 · 3 comments
Labels
bug Something isn't working needs-analysis
Milestone

Comments

@ybizeul
Copy link

ybizeul commented Dec 1, 2024

General

plb_exclude_something set, but two VMs are still on same node.
Logs indicates that rebalance is needed, but not performed (k8s-prod-worker-kpd8v)

Weighting

Score: 10

Config

[proxmox]
api_host: 10.65.179.101
api_user: root@pam
api_pass: ******
verify_ssl: 0
[vm_balancing]
enable: 1
method: memory
mode: used
maintenance_nodes: dummynode03,dummynode04
ignore_nodes: pve5
ignore_vms: testvm01,testvm02
[storage_balancing]
enable: 0
[update_service]
enable: 0
[api]
enable: 0
[service]
daemon: 1
schedule: 24
log_verbosity: DEBUG
config_version: 3

Log

Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [balanciness-validation]: Rebalancing for memory is not needed. Highest usage: 97% | Lowest usage: 90%.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-vm-calculator]: Balancing calculations done.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-maintenance-vm-calculator]: Maintenance mode for the following hosts defined: set()
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: Node pve1 has been added as an already used node to the anti-affinity group plb_exclude_worker.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: No rebalancing for VM k8s-prod-worker-2fk8w needed due to any anti-affinity group policies.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: Rebalancing of VM tco-linux is needed due to anti-affinity group policy.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [random-node-getter]: New random node pve1 evaluated for vm tco-linux in run 1.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: Node pve2 has been added as an already used node to the anti-affinity group plb_exclude_worker.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: No rebalancing for VM k8s-prod-worker-vpz8c needed due to any anti-affinity group policies.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: Rebalancing of VM k8s-prod-worker-kpd8v is needed due to anti-affinity group policy.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [random-node-getter]: New random node pve1 evaluated for vm k8s-prod-worker-kpd8v in run 1.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: Node pve3 has been added as an already used node to the anti-affinity group plb_exclude_k8s_control.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: No rebalancing for VM k8s-prod-control-plane-2q7r5 needed due to any anti-affinity group policies.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: Node pve2 has been added as an already used node to the anti-affinity group plb_exclude_k8s_control.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [rebalancing-tags-group-exclude]: No rebalancing for VM k8s-prod-control-plane-vs8tp needed due to any anti-affinity group policies.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [vm-rebalancing-executor]: No rebalancing needed.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [cli-output-generator]: Start rebalancing vms to their new nodes.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [cli-output-generator]: No rebalancing needed.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [post-validations]: All post-validations succeeded.
Dec 01 22:48:12 pve1 proxlb[3729287]:  ProxLB: Info: [daemon]: Running in daemon mode. Next run in 24 hours.

Meta

Version: 1.0.5
Installed from: deb
Running as: local on proxmox

@ybizeul ybizeul added bug Something isn't working needs-analysis labels Dec 1, 2024
@erth5
Copy link

erth5 commented Dec 10, 2024

Same Problem on pve-manager/8.3.1/fb48e850ef9dde27 (running kernel: 6.8.12-4-pve)
I exclude a qourum sever
ignore_nodes: pve0
but it migrates VMs to there
Dec 10 16:05:47 pve1 proxlb[8185]: ProxLB: Info: [vm-rebalancing-executor]: Rebalancing VM deb3 from node pve1 to node pve0

installed from dpgk
Version: 1.0.5
api on 127.0.0.1

@laitco
Copy link

laitco commented Feb 24, 2025

Same error with the tags of like plb_exclude_something. Rule seeams to be ignored and VMs are not migrated to seperate hosts to keep them apart.

My actual workarround:
plb_ignore_vm and setting a HA group rule to specific host

Linux 6.8.12-8-pve (8.3.4)
Version: ProxLB version 1.0.5

@gyptazy gyptazy added this to the Release 1.1.0 milestone Feb 24, 2025
@gyptazy
Copy link
Owner

gyptazy commented Feb 24, 2025

This will be fixed with version 1.1.0 in #114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-analysis
Projects
None yet
Development

No branches or pull requests

4 participants