From 1402ba9732b75a2d90659dff61d88c3b8124d573 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 13 Apr 2025 10:48:23 +0200 Subject: [PATCH] Minor typo fixes s/connectoing/connecting/ s/furhter/further/ s/interating/iterating/ s/ist/is/ s/maintence/maintenance/ s/performt/performed/ s/ressources/resources/ s/sucessfully/successfully/ s/the the/the/ s/timout/timeout/ s/wether/whether/ --- README.md | 2 +- docs/03_configuration.md | 2 +- proxlb/models/balancing.py | 4 ++-- proxlb/models/calculations.py | 10 +++++----- proxlb/models/tags.py | 2 +- proxlb/utils/proxmox_api.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a8bb009..060747c 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ vi proxlb.yaml docker run -it --rm -v $(pwd)/proxlb.yaml:/etc/proxlb/proxlb.yaml proxlb ``` -*Note: ProxLB container images are officially only available at cr.proxlb.de and cr.gyptazy.com.* +*Note: ProxLB container images are officially only available at cr.proxlb.de and cr.gyptazy.com.* #### Overview of Images | Version | Image | diff --git a/docs/03_configuration.md b/docs/03_configuration.md index f011c1d..e6b848a 100644 --- a/docs/03_configuration.md +++ b/docs/03_configuration.md @@ -111,7 +111,7 @@ balancing: *Note: This may have impacts to the cluster. Depending on the created group matrix, the result may also be an unbalanced cluster.* ### API Loadbalancing -ProxLB supports API loadbalancing, where one or more host objects can be defined as a list. This ensures, that you can even operator ProxLB without furhter changes when one or more nodes are offline or in a maintence. When defining multiple hosts, the first reachable one will be picked. +ProxLB supports API loadbalancing, where one or more host objects can be defined as a list. This ensures, that you can even operator ProxLB without further changes when one or more nodes are offline or in a maintenance. When defining multiple hosts, the first reachable one will be picked. ``` proxmox_api: diff --git a/proxlb/models/balancing.py b/proxlb/models/balancing.py index 3fb22a9..08ecb3a 100644 --- a/proxlb/models/balancing.py +++ b/proxlb/models/balancing.py @@ -52,7 +52,7 @@ class Balancing: """ for guest_name, guest_meta in proxlb_data["guests"].items(): - # Check if the the guest's target is not the same as the current node + # Check if the guest's target is not the same as the current node if guest_meta["node_current"] != guest_meta["node_target"]: # Check if the guest is not ignored and perform the balancing # operation based on the guest type @@ -192,7 +192,7 @@ class Balancing: if job["status"] == "stopped": if job["exitstatus"] == "OK": - logger.debug(f"Balancing: Job ID {job_id} (guest: {guest_name}) was sucessfully.") + logger.debug(f"Balancing: Job ID {job_id} (guest: {guest_name}) was successfully.") logger.debug("Finished: get_rebalancing_job_status.") return True else: diff --git a/proxlb/models/calculations.py b/proxlb/models/calculations.py index 5c3a9f2..4e004ff 100644 --- a/proxlb/models/calculations.py +++ b/proxlb/models/calculations.py @@ -66,7 +66,7 @@ class Calculations: @staticmethod def set_node_assignments(proxlb_data: Dict[str, Any]) -> Dict[str, Any]: """ - Set the assigned ressources of the nodes based on the current assigned + Set the assigned resources of the nodes based on the current assigned guest resources by their created groups as an initial base. Args: @@ -208,10 +208,10 @@ class Calculations: if proxlb_data["meta"]["balancing"]["balance"] or proxlb_data["meta"]["balancing"].get("enforce_affinity", False): if proxlb_data["meta"]["balancing"].get("balance", False): - logger.debug("Balancing of guests will be performt. Reason: balanciness") + logger.debug("Balancing of guests will be performed. Reason: balanciness") if proxlb_data["meta"]["balancing"].get("enforce_affinity", False): - logger.debug("Balancing of guests will be performt. Reason: enforce affinity balancing") + logger.debug("Balancing of guests will be performed. Reason: enforce affinity balancing") for group_name in proxlb_data["groups"]["affinity"]: @@ -246,10 +246,10 @@ class Calculations: None """ logger.debug("Starting: val_anti_affinity.") - # Start by interating over all defined anti-affinity groups + # Start by iterating over all defined anti-affinity groups for group_name in proxlb_data["groups"]["anti_affinity"].keys(): - # Validate if the provided guest ist included in the anti-affinity group + # Validate if the provided guest is included in the anti-affinity group if guest_name in proxlb_data["groups"]["anti_affinity"][group_name]['guests'] and not proxlb_data["guests"][guest_name]["processed"]: logger.debug(f"Anti-Affinity: Guest: {guest_name} is included in anti-affinity group: {group_name}.") diff --git a/proxlb/models/tags.py b/proxlb/models/tags.py index 10a6306..33661e7 100644 --- a/proxlb/models/tags.py +++ b/proxlb/models/tags.py @@ -139,7 +139,7 @@ class Tags: tags (List): A list holding all defined tags for a given guest. Returns: - Bool: Returns a bool that indicates wether to ignore a guest or not. + Bool: Returns a bool that indicates whether to ignore a guest or not. """ logger.debug("Starting: get_ignore.") ignore_tag = False diff --git a/proxlb/utils/proxmox_api.py b/proxlb/utils/proxmox_api.py index 7ca3368..4ac87c7 100644 --- a/proxlb/utils/proxmox_api.py +++ b/proxlb/utils/proxmox_api.py @@ -262,7 +262,7 @@ class ProxmoxApi: logger.debug("Starting: test_api_proxmox_host_ipv4.") sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(timeout) - logger.warning(f"Warning: Host {host} ran into a timout when connectoing on IPv4 for tcp/{port}.") + logger.warning(f"Warning: Host {host} ran into a timeout when connecting on IPv4 for tcp/{port}.") result = sock.connect_ex((host, port)) if result == 0: