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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user