Fix zoned executor metric when unzoned is allowed

An executor can have a zone configured and at the same time allow
unzoned jobs. In this case the executor was not counted for the zoned
executor metric (online/accepting).

Change-Id: Ib39947e3403d828b595cf2479e64789e049e63cc
This commit is contained in:
Simon Westphahl
2022-08-11 15:38:53 +02:00
parent d35b9f8c73
commit d61b9772ff
3 changed files with 18 additions and 2 deletions

View File

@@ -3157,6 +3157,10 @@ class ExecutorServer(BaseMergeServer):
self.allow_unzoned = get_default(self.config, 'executor',
'allow_unzoned', False)
# If this executor has no zone configured it is implicitly unzoned
if self.zone is None:
self.allow_unzoned = True
# Those attributes won't change, so it's enough to set them once on the
# component info.
self.component_info.zone = self.zone