`Bug`: Config option vm_parallel_migrations is incorrect: 2 after update 1.0.2->1.0.4
Closed this issue · 5 comments
General
wget https://repo.gyptazy.com/stable/proxlb_1.0.4_amd64.deb
apt-get install ./proxlb_1.0.4_amd64.deb
vi proxlb.conf
proxlb -d
<2> ProxLB: Error: [config]: Config option vm_parallel_migrations is incorrect: 2
Weighting
Score: <-- 9 -->
Config
[proxmox]
api_host: xxx.xxx.xxx.xxx
api_user: root
api_pass: xxxxxx
verify_ssl: 0
[vm_balancing]
enable: 1
method: memory
mode: assigned
mode_option:bytes
type: vm
balanciness: 10
parallel_migrations: 2
maintenance_nodes:
ignore_nodes:
ignore_vms: 132,135,140,144
[storage_balancing]
enable: 0
balanciness: 10
parallel_migrations: 1
[update_service]
enable: 1
[api]
enable: 0
[service]
# The master_only option might be usuful if running ProxLB on all nodes in a cluster
# but only a single one should do the balancing. The master node is obtained from the Proxmox
# HA status.
master_only: 0
daemon: 1
schedule: 2
log_verbosity: INFO
config_version: 3
Log
<-- Attach the ProxLB debug log for further analysis. Please take car to NOT publish your API credentials! -->
Meta
Please provide some more information about your setup. This includes where you obtained ProxLB (e.g., as a .deb
file, from the repository or container image) and also which version you're running in which mode. You can obtain the used version from you image version, your local repository information or by running proxlb -v
.
Version: 1.0.4
Installed from: (https://repo.gyptazy.com/stable/proxlb_1.0.4_amd64.deb)
Running as: local on Proxmox
Hey @lgzcoollg,
unfortunately, this isn't a bug at all. The vm_parallel_migrations
option is interpreted as a bool to enable parallel migrations in general or to run sequentially. Therefore, only 0
(False) and 1
(True) are valid. It doesn't represent an amount of parallel migrations - but that's also a great feature idea. Do you need something like this to allow a certain amount of VMs to be migrated in parallel? In previous versions the '2' got just interpreted as '1' (because if it's not Flase it's simply True ;)) and was therefore simply activated in general.
This would require a bit more efforts but I can see a reason behind it if needed. I also updated the docs to make the current situation more clear: https://github.com/gyptazy/ProxLB/pull/105/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
Cheers,
gyptazy
Hey @lgzcoollg, 嘿
unfortunately, this isn't a bug at all. The
vm_parallel_migrations
option is interpreted as a bool to enable parallel migrations in general or to run sequentially. Therefore, only0
(False) and1
(True) are valid. It doesn't represent an amount of parallel migrations - but that's also a great feature idea. Do you need something like this to allow a certain amount of VMs to be migrated in parallel? In previous versions the '2' got just interpreted as '1' (because if it's not Flase it's simply True ;)) and was therefore simply activated in general.不幸的是,这根本不是一个错误。该选项被解释为 bool 以启用通常的并行迁移或按顺序运行。因此,只有 (False) 和 (True) 有效。它并不代表大量的并行迁移 - 但这也是一个很棒的功能想法。您是否需要这样的操作来允许并行迁移一定数量的 VM?在以前的版本中,'2' 被解释为 '1' (因为如果它不是 Flase,它就是 True ;)),因此通常只是被激活。This would require a bit more efforts but I can see a reason behind it if needed. I also updated the docs to make the current situation more clear: https://github.com/gyptazy/ProxLB/pull/105/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5这需要更多的努力,但如果需要,我可以看到它背后的原因。我还更新了文档以使当前情况更加清晰:https://github.com/gyptazy/ProxLB/pull/105/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5
Cheers, 干杯 gyptazy 乳糖酶
ok, maybe its my illusion at the v1.0.2.
thanks a lot.
@gyptazy pls help more to check my conf file;
I got ProxLB: Error: [config]: Could not find the required options in config file.
after I change vm_parallel_migrations
to 1
root@pve0:~# systemctl status proxlb
× proxlb.service - ProxLB - Rebalance VM workloads
Loaded: loaded (/etc/systemd/system/proxlb.service; static)
Active: failed (Result: exit-code) since Thu 2024-10-17 09:06:02 CST; 6min ago
Duration: 227ms
Process: 3171118 ExecStart=/usr/bin/proxlb -c /etc/proxlb/proxlb.conf (code=exited, status=2)
Main PID: 3171118 (code=exited, status=2)
CPU: 225ms
Oct 17 09:06:02 pve0 systemd[1]: Started proxlb.service - ProxLB - Rebalance VM workloads.
Oct 17 09:06:02 pve0 proxlb[3171118]: ProxLB: Error: [config]: Could not find the required options in config file.
Oct 17 09:06:02 pve0 systemd[1]: proxlb.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 17 09:06:02 pve0 systemd[1]: proxlb.service: Failed with result 'exit-code'.
and my dry-run looks fine. (except the ignore_vms
(144)show in moving)
<6> ProxLB: Info: [post-validations]: All post-validations succeeded.
<6> ProxLB: Info: [daemon]: Running in daemon mode. Next run in 2 hours.
<6> ProxLB: Info: [get-most-used-resources-vm]: ('pbs-backup', {'group_include': None, 'group_exclude': None, 'cpu_total': 8, 'cpu_used': 0.037041594893663, 'memory_total': 21474836480, 'memory_used': 20292779606, 'disk_total': 34359738368, 'disk_used': 0, 'vmid': 144, 'node_parent': 'pve0', 'node_rebalance': 'pve0', 'storage': {'ide2': {}, 'scsi0': {'name': 'vm-144-disk-0.qcow2', 'device_name': 'scsi0', 'volume': 'disk2', 'storage_parent': 'disk2', 'storage_rebalance': 'disk2', 'size': '32'}, 'scsi1': {}}, 'type': 'vm'})
<6> ProxLB: Info: [get-most-free-resources-nodes]: ('pve2', {'maintenance': False, 'ignore': False, 'cpu_total': 12, 'cpu_assigned': 10.103796586555207, 'cpu_assigned_percent': 84.19830488796006, 'cpu_assigned_percent_last_run': 0, 'cpu_used': 0, 'cpu_free': 12, 'cpu_free_percent': 100, 'cpu_free_percent_last_run': 0, 'memory_total': 134939172864, 'memory_assigned': 27917287424, 'memory_assigned_percent': 20, 'memory_assigned_percent_last_run': 20, 'memory_used': 43566478850, 'memory_free': 91372694014, 'memory_free_percent': 67, 'memory_free_percent_last_run': 0, 'disk_total': 100861726720, 'disk_assigned': 816043786240, 'disk_assigned_percent': 809.0717983694658, 'disk_assigned_percent_last_run': 0, 'disk_used': 7876427776, 'disk_free': 92985298944, 'disk_free_percent': 92, 'disk_free_percent_last_run': 0, 'memory_assigned_percent_match': False})
<6> ProxLB: Info: [rebalancing-resource-statistics-update]: Moving pbs-backup from pve0 to pve2
Hey @lgzcoollg
sorry, I don’t get the question.
The config schema changed and must be adjusted to fit the newly introduced config schema. As I understand, you already did this and the dry-run runs so far.
however, there’s currently a bug with the newly introduced maintenance mode which led to a bug in the ignore function (see also: #102).
cheers,
gyptazy
Hey @lgzcoollg
sorry, I don’t get the question. The config schema changed and must be adjusted to fit the newly introduced config schema. As I understand, you already did this and the dry-run runs so far.
however, there’s currently a bug with the newly introduced maintenance mode which led to a bug in the ignore function (see also: #102).
cheers, gyptazy
questions:
- Error: [config]: Could not find the required options in config file.(-> systemctl status proxlb)
- the ignore_vms shouldn't move.(-> proxlb -d)
thanks