From 3374c883c7da147e95d468d1151420bf87682473 Mon Sep 17 00:00:00 2001 From: Tobias Henkel Date: Thu, 1 Feb 2018 15:47:33 +0100 Subject: [PATCH] Fix missing min_avail_mem in memory governor Somehow the memory governor made it into without the needed min_avail_mem variable. Add that to prevent repeated crashing of the governor thread [1]. [1] Trace: 2018-02-01 14:42:15,533 ERROR zuul.ExecutorServer: Exception in governor thread: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/zuul/executor/server.py", line 1959, in run_governor self.manageLoad() File "/usr/lib/python3.6/site-packages/zuul/executor/server.py", line 1975, in manageLoad elif avail_mem_pct < self.min_avail_mem: AttributeError: 'ExecutorServer' object has no attribute 'min_avail_mem' Change-Id: I9af5ba3ef3200f1a8d1bdb41906a1b77ef4e7f55 --- zuul/executor/server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zuul/executor/server.py b/zuul/executor/server.py index d2c04ac102..985ca04088 100644 --- a/zuul/executor/server.py +++ b/zuul/executor/server.py @@ -1632,6 +1632,8 @@ class ExecutorServer(object): load_multiplier = float(get_default(self.config, 'executor', 'load_multiplier', '2.5')) self.max_load_avg = multiprocessing.cpu_count() * load_multiplier + self.min_avail_mem = float(get_default(self.config, 'executor', + 'min_avail_mem', '5.0')) self.accepting_work = False self.execution_wrapper = connections.drivers[execution_wrapper_name]