Include job_uuid in NodeRequests
This is part of the circular dependency refactor. It updates the NodeRequest object to include the job_uuid in addition to the job_name (which is temporarily kept for backwards compatability). When node requests are completed, we now look up the job by uuid if supplied. Change-Id: I57d4ab6c241b03f76f80346b5567600e1692947a
This commit is contained in:
@@ -3047,12 +3047,11 @@ class Scheduler(threading.Thread):
|
||||
return
|
||||
|
||||
log = get_annotated_logger(self.log, request.event_id)
|
||||
job = build_set.item.getJob(request.job_name)
|
||||
job = build_set.item.getJob(request._job_id)
|
||||
if job is None:
|
||||
log.warning("Item %s does not contain job %s "
|
||||
"for node request %s",
|
||||
build_set.item, request.job_name, request)
|
||||
build_set.removeJobNodeRequestID(request.job_name)
|
||||
build_set.item, request._job_id, request)
|
||||
return
|
||||
|
||||
# If the request failed, we must directly delete it as the nodes will
|
||||
@@ -3063,7 +3062,7 @@ class Scheduler(threading.Thread):
|
||||
|
||||
nodeset = self.nodepool.getNodeSet(request, job.nodeset)
|
||||
|
||||
job = build_set.item.getJob(request.job_name)
|
||||
job = build_set.item.getJob(request._job_id)
|
||||
if build_set.getJobNodeSetInfo(job) is None:
|
||||
pipeline.manager.onNodesProvisioned(request, nodeset, build_set)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user