From b7bfd33a28aeeb7166622dbf923e128fd8b22e5b Mon Sep 17 00:00:00 2001 From: andersonid Date: Wed, 1 Oct 2025 15:29:43 -0300 Subject: [PATCH] Add debug logging for overcommit calculation --- app/api/routes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/api/routes.py b/app/api/routes.py index cf807e7..87f803c 100644 --- a/app/api/routes.py +++ b/app/api/routes.py @@ -173,6 +173,10 @@ async def get_cluster_status( if memory_capacity > 0: memory_overcommit_percent = round((memory_requests / memory_capacity) * 100, 1) + # Debug logging + logger.info(f"Overcommit Debug - CPU Capacity: {cpu_capacity}, CPU Requests: {cpu_requests}, CPU Overcommit: {cpu_overcommit_percent}%") + logger.info(f"Overcommit Debug - Memory Capacity: {memory_capacity}, Memory Requests: {memory_requests}, Memory Overcommit: {memory_overcommit_percent}%") + # Count namespaces in overcommit (simplified - any namespace with requests > 0) namespaces_in_overcommit = len([ns for ns in namespaces_list if ns['total_validations'] > 0])