[why] When add a cluster job to taskqueue use host, but we don't change the queue of job to the host.
So when finished job we hand over the queue of job to extract queue will get 409 error.
[how] Set the queue of job to the host.
Signed-off-by: Cao Xueliang caoxl78320@163.com --- src/scheduler/submit_job.cr | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/scheduler/submit_job.cr b/src/scheduler/submit_job.cr index 8871464..8838e40 100644 --- a/src/scheduler/submit_job.cr +++ b/src/scheduler/submit_job.cr @@ -49,8 +49,8 @@ class Sched
# steps for each host cluster_config["nodes"].as_h.each do |host, config| - tbox_group = host.to_s - job_id = add_task(tbox_group, lab) + queue = host.to_s + job_id = add_task(queue, lab)
# return when job_id is '0' # 2 Questions: @@ -58,15 +58,16 @@ class Sched # - may consume job before all jobs done return job_messages << { "job_id" => "0", - "message" => "add task queue sched/#{tbox_group} failed", + "message" => "add task queue sched/#{queue} failed", "job_state" => "submit", } unless job_id
job_ids << job_id
# add to job content when multi-test - job["testbox"] = tbox_group - job.update_tbox_group(tbox_group) + job["testbox"] = queue + job["queue"] = queue + job.update_tbox_group(queue) job["node_roles"] = config["roles"].as_a.join(" ") direct_macs = config["macs"].as_a direct_ips = [] of String
Reviewed-by: Ren Wen 15991987063@163.com
On Thu, Nov 12, 2020 at 03:40:08PM +0800, Cao Xueliang wrote:
[why] When add a cluster job to taskqueue use host, but we don't change the queue of job to the host.
So when finished job we hand over the queue of job to extract queue will get 409 error.
[how] Set the queue of job to the host.
Signed-off-by: Cao Xueliang caoxl78320@163.com
src/scheduler/submit_job.cr | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/scheduler/submit_job.cr b/src/scheduler/submit_job.cr index 8871464..8838e40 100644 --- a/src/scheduler/submit_job.cr +++ b/src/scheduler/submit_job.cr @@ -49,8 +49,8 @@ class Sched
# steps for each host cluster_config["nodes"].as_h.each do |host, config|
tbox_group = host.to_s
job_id = add_task(tbox_group, lab)
queue = host.to_s
job_id = add_task(queue, lab) # return when job_id is '0' # 2 Questions:
@@ -58,15 +58,16 @@ class Sched # - may consume job before all jobs done return job_messages << { "job_id" => "0",
"message" => "add task queue sched/#{tbox_group} failed",
"message" => "add task queue sched/#{queue} failed", "job_state" => "submit", } unless job_id job_ids << job_id # add to job content when multi-test
job["testbox"] = tbox_group
job.update_tbox_group(tbox_group)
job["testbox"] = queue
job["queue"] = queue
job.update_tbox_group(queue) job["node_roles"] = config["roles"].as_a.join(" ") direct_macs = config["macs"].as_a direct_ips = [] of String
-- 2.23.0
On Thu, Nov 12, 2020 at 04:34:47PM +0800, Ren Wen wrote:
Reviewed-by: Ren Wen 15991987063@163.com
Thanks, Xueliang
On Thu, Nov 12, 2020 at 03:40:08PM +0800, Cao Xueliang wrote:
[why] When add a cluster job to taskqueue use host, but we don't change the queue of job to the host.
So when finished job we hand over the queue of job to extract queue will get 409 error.
[how] Set the queue of job to the host.
Signed-off-by: Cao Xueliang caoxl78320@163.com
src/scheduler/submit_job.cr | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/scheduler/submit_job.cr b/src/scheduler/submit_job.cr index 8871464..8838e40 100644 --- a/src/scheduler/submit_job.cr +++ b/src/scheduler/submit_job.cr @@ -49,8 +49,8 @@ class Sched
# steps for each host cluster_config["nodes"].as_h.each do |host, config|
tbox_group = host.to_s
job_id = add_task(tbox_group, lab)
queue = host.to_s
job_id = add_task(queue, lab) # return when job_id is '0' # 2 Questions:
@@ -58,15 +58,16 @@ class Sched # - may consume job before all jobs done return job_messages << { "job_id" => "0",
"message" => "add task queue sched/#{tbox_group} failed",
"message" => "add task queue sched/#{queue} failed", "job_state" => "submit", } unless job_id job_ids << job_id # add to job content when multi-test
job["testbox"] = tbox_group
job.update_tbox_group(tbox_group)
job["testbox"] = queue
job["queue"] = queue
job.update_tbox_group(queue) job["node_roles"] = config["roles"].as_a.join(" ") direct_macs = config["macs"].as_a direct_ips = [] of String
-- 2.23.0
On Thu, Nov 12, 2020 at 03:40:08PM +0800, Cao Xueliang wrote:
[why] When add a cluster job to taskqueue use host, but we don't change the queue of job to the host.
So when finished job we hand over the queue of job to extract queue will get 409 error.
[how] Set the queue of job to the host.
Signed-off-by: Cao Xueliang caoxl78320@163.com
Looks good to me.
Thanks, Yale
src/scheduler/submit_job.cr | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/scheduler/submit_job.cr b/src/scheduler/submit_job.cr index 8871464..8838e40 100644 --- a/src/scheduler/submit_job.cr +++ b/src/scheduler/submit_job.cr @@ -49,8 +49,8 @@ class Sched
# steps for each host cluster_config["nodes"].as_h.each do |host, config|
tbox_group = host.to_s
job_id = add_task(tbox_group, lab)
queue = host.to_s
job_id = add_task(queue, lab) # return when job_id is '0' # 2 Questions:
@@ -58,15 +58,16 @@ class Sched # - may consume job before all jobs done return job_messages << { "job_id" => "0",
"message" => "add task queue sched/#{tbox_group} failed",
"message" => "add task queue sched/#{queue} failed", "job_state" => "submit", } unless job_id job_ids << job_id # add to job content when multi-test
job["testbox"] = tbox_group
job.update_tbox_group(tbox_group)
job["testbox"] = queue
job["queue"] = queue
job.update_tbox_group(queue) job["node_roles"] = config["roles"].as_a.join(" ") direct_macs = config["macs"].as_a direct_ips = [] of String
-- 2.23.0