Merge pull request #1830 from coreos-inc/superuser-dashboard

Add prometheus stats to enable better dashboarding
This commit is contained in:
josephschorr 2016-09-26 17:19:22 +02:00 committed by GitHub
commit ad4efba802
18 changed files with 128 additions and 199 deletions

View file

@ -182,6 +182,7 @@ class EphemeralBuilderManager(BaseManager):
self._build_uuid_to_info.pop(build_job.build_uuid, None)
raise Return()
executor_name = build_info.executor_name
execution_id = build_info.execution_id
# If we have not yet received a heartbeat, then the node failed to boot in some way. We mark
@ -196,7 +197,7 @@ class EphemeralBuilderManager(BaseManager):
execution_id))
if got_lock:
logger.warning('Marking job %s as incomplete', build_job.build_uuid)
self.job_complete_callback(build_job, BuildJobResult.INCOMPLETE)
self.job_complete_callback(build_job, BuildJobResult.INCOMPLETE, executor_name)
# Finally, we terminate the build execution for the job. We don't do this under a lock as
# terminating a node is an atomic operation; better to make sure it is terminated than not.
@ -550,7 +551,10 @@ class EphemeralBuilderManager(BaseManager):
build_job.build_uuid, job_status)
# Mark the job as completed.
self.job_complete_callback(build_job, job_status)
build_info = self._build_uuid_to_info.get(build_job.build_uuid, None)
executor_name = build_info.executor_name if build_info else None
self.job_complete_callback(build_job, job_status, executor_name)
# Kill the ephmeral builder.
yield From(self.kill_builder_executor(build_job.build_uuid))