Add node host_ids to logstash fields

Add the nova hostId field to the logstash fields when it is provided
by nodepool for all nodes used in the build.

Change-Id: I3894da279132fa2d1c6160dd48573383e058677a
This commit is contained in:
Logan V 2019-01-04 11:32:29 -06:00
parent ce5c339b86
commit 6cca4738b3

View File

@ -142,6 +142,8 @@ class LogMatcher(object):
# TODO: this is too simplistic for zuul v3 multinode jobs
node = hosts[0]
fields["build_node"] = node['nodepool']['label']
fields["build_hostids"] = [h['nodepool']['host_id'] for h in hosts
if 'host_id' in h['nodepool']]
# TODO: should be build_executor, or removed completely
fields["build_master"] = zuul['executor']['hostname']