Browse Source

memory health check: adjust threshold for etcd

Luke Meyer 7 years ago
parent
commit
da04b57277

+ 1 - 1
roles/openshift_health_checker/openshift_checks/memory_availability.py

@@ -13,7 +13,7 @@ class MemoryAvailability(OpenShiftCheck):
     recommended_memory_bytes = {
         "masters": 16 * 10**9,
         "nodes": 8 * 10**9,
-        "etcd": 20 * 10**9,
+        "etcd": 8 * 10**9,
     }
 
     @classmethod

+ 9 - 3
roles/openshift_health_checker/test/memory_availability_test.py

@@ -39,7 +39,7 @@ def test_is_active(group_names, is_active):
     (
         ['etcd'],
         0,
-        22200,
+        8200,
     ),
     (
         ['masters', 'nodes'],
@@ -82,8 +82,14 @@ def test_succeeds_with_recommended_memory(group_names, configured_min, ansible_m
     (
         ['etcd'],
         0,
-        -1,
-        ['0.0 GB'],
+        7000,
+        ['7.0 GB'],
+    ),
+    (
+        ['etcd', 'masters'],
+        0,
+        9000,  # enough memory for etcd, not enough for a master
+        ['9.0 GB'],
     ),
     (
         ['nodes', 'masters'],