`Bug`: Certain config values that should always be int become bool if value is "0" or "1"
Closed this issue · 3 comments
General
I noticed that when I set "schedule" to "1" I get a long message <6> ProxLB: Info: [daemon]: Running in daemon mode. Next run in TRUE hours.
In this particular case, schedule work as intended, but I noticed, storage_balanciness, vm_balanciness, schedule, config_version, might have the same issue. And it could cause unintended behaviors.
I still need to test this fix, but I believe there would be an easy fix in __update_config_parser_bools
d9c133f
Weighting
Score: 2
Config
[proxmox]
api_host: foo
api_user: foo
api_password: ***
verify_ssl: 0
[vm_balancing]
enable: 1
method: memory
mode: used
type: vm
ignore_nodes: foo1
ignore_vms: foo2
[update_service]
enable: 0
[api]
enable: 0
[service]
demon: 1
schedule: 1
log_verbosity: WARN
config_version:3
Meta
install from .deb in container
Version: 1.0.4
Installed from: deb file
Running as: Container
Hey @elliotnev27,
thanks for raising this up. Please do not spend any time into this as long as this is just a visual thing and does not have any impacts to the features. I currently refactor the whole code base (#114) and also switch from config file in ini style to yaml to do not waste time and sluggy code for type converts. The new code base will deprecate the current one. Maybe it might make sense when reaching a certain level of code to already create a PR to provide other ones a way to also test this.
I expect to have it hopefully done by the end of October.
Cheers,
gyptazy
👍 sounds good! I figured as much enjoy the rest of your weekend!
Hey @elliotnev27,
since 1 hour is an absolutely legitim value and the refactor will take up to Q1 2025 it makes sense to fix this.
Will be part of 1.0.6.
Thanks for reporting!
Cheers,
gyptazy