
How to check whether a job is cluster job or not at LKP? should_wait_cluster() { [ -z "$LKP_SERVER" ] && return 1 [ -z "$node_roles" ] && return 1 [ "$cluster" = "cs-localhost" ] && return 1 return 0 } So when you need a cluster job, the value of cluster field should not be "cs-localhost". Signed-off-by: Ren Wen <15991987063@163.com> --- src/scheduler/submit_job.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scheduler/submit_job.cr b/src/scheduler/submit_job.cr index 8838e40..1297b57 100644 --- a/src/scheduler/submit_job.cr +++ b/src/scheduler/submit_job.cr @@ -9,10 +9,10 @@ class Sched job = Job.new(job_content, job_content["id"]?) job["commit_date"] = get_commit_date(job) - # it is not a cluster job if cluster field is empty or - # field's prefix is 'cs-localhost' + # how to execute a cluster job: + # has a cluster field, and the value is not "cs-localhost" cluster_file = job["cluster"] - if cluster_file.empty? || cluster_file.starts_with?("cs-localhost") + if cluster_file.empty? || cluster_file == "cs-localhost" return submit_single_job(job) else cluster_config = get_cluster_config(cluster_file, -- 2.23.0