summaryrefslogtreecommitdiff
path: root/zuul/executor
diff options
context:
space:
mode:
authorFelix Edel <felix.edel@bmw.de>2022-02-21 13:02:44 +0100
committerTobias Henkel <tobias.henkel@bmw.de>2022-02-24 20:50:03 +0100
commit8db6b6113a2f5cc98511cfe1f1aa91c96391ad62 (patch)
treeef2f562afc040bf186d5b6fbaf7d4f9bc6a63cb3 /zuul/executor
parentd5385d7fc58f98d719ebe981e053ff12e639aed6 (diff)
downloadzuul-8db6b6113a2f5cc98511cfe1f1aa91c96391ad62.tar.gz
Look up worker_zone for log streaming from executor
Currently, we are looking up the worker_zone for the log streaming from the BuildRequest's path in ZooKeeper. This is a problem for unzoned builds as those builds don't provide a zone information in their path (zone=None). Due to this, the log streaming won't use the FingerGateways and instead always falls back to use the direct connection to the executor. This works as long as the executor is located in the same region as zuul-web, but in other cases the log streaming is broken. To fix this, the executor will now store its zone information in the worker_info of the BuildRequest when accepting the BuildRequest. In the streamer_utils library we will use this zone information instead of the zone from the ZooKeeper path. Co-Authored-By: Simon Westphahl <simon.westphahl@bmw.de> Change-Id: I63b148fa29e05157fce032d0f41b909da8a11e87
Diffstat (limited to 'zuul/executor')
-rw-r--r--zuul/executor/server.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index acb2e3cc7..5f9896e3f 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -3726,6 +3726,7 @@ class ExecutorServer(BaseMergeServer):
build_request.worker_info = {
"hostname": self.hostname,
"log_port": self.log_streaming_port,
+ "zone": self.zone,
}
self.executor_api.update(build_request)
except Exception: