diff --git a/README.md b/README.md index c09e020..d3e4f2e 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ The following options can be set in the configuration file `proxlb.yaml`: | | overprovisioning | False | `Bool` | Avoids balancing when nodes would become overprovisioned. | | `balancing` | | | | | | | enable | True | `Bool` | Enables the guest balancing. (default: True)| -| | force | True | `Bool` | Enforcing affinity/anti-affinity rules but balancing might become worse. (default: False) | +| | enforce_affinity | True | `Bool` | Enforcing affinity/anti-affinity rules but balancing might become worse. (default: False) | | | parallel | False | `Bool` | If guests should be moved in parallel or sequentially. (default: False)| | | live | True | `Bool` | If guests should be moved live or shutdown. (default: True)| | | with_local_disks | True | `Bool` | If balancing of guests should include local disks (default: True)| @@ -184,7 +184,7 @@ proxmox_cluster: balancing: enable: True - force: False + enforce_affinity: False parallel: False live: True with_local_disks: True diff --git a/config/proxlb_example.yaml b/config/proxlb_example.yaml index 430f6e6..423d693 100644 --- a/config/proxlb_example.yaml +++ b/config/proxlb_example.yaml @@ -15,7 +15,7 @@ proxmox_cluster: balancing: enable: True - force: False + enforce_affinity: False parallel: False live: True with_local_disks: True diff --git a/proxlb/models/calculations.py b/proxlb/models/calculations.py index 4a973c5..8b4d9c4 100644 --- a/proxlb/models/calculations.py +++ b/proxlb/models/calculations.py @@ -207,13 +207,13 @@ class Calculations: None """ logger.debug("Starting: relocate_guests.") - if proxlb_data["meta"]["balancing"]["balance"] or proxlb_data["meta"]["balancing"]["force"]: + if proxlb_data["meta"]["balancing"]["balance"] or proxlb_data["meta"]["balancing"]["enforce_affinity"]: if proxlb_data["meta"]["balancing"].get("balance", False): logger.debug("Balancing of guests will be performt. Reason: balanciness") - if proxlb_data["meta"]["balancing"].get("force", False): - logger.debug("Balancing of guests will be performt. Reason: force balancing") + if proxlb_data["meta"]["balancing"].get("enforce_affinity", False): + logger.debug("Balancing of guests will be performt. Reason: enforce affinity balancing") for group_name in proxlb_data["groups"]["affinity"]: