[Why] The result_root directory of the job stores the running results. It plays an important role in locating problems. So puts this info to docker logs, submit -m can show result_root. [Output Example] {"job_id"=>"z9.1", "message"=>"", "job_state"=>"submit", "result_root"=>"/srv/result/iperf/vm-2p8g/2020-10-22/z9.1"} {"job_id"=>"z9.1", "result_root"=>"/srv/result/iperf/vm-2p8g/2020-10-22/z9.1", "job_state"=>"set result root"}
Signed-off-by: Wu Zhende wuzhende666@163.com --- src/lib/sched.cr | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 7215df5..070a16b 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -227,6 +227,7 @@ class Sched "job_id" => job_id, "message" => message.to_s, "job_state" => "submit", + "result_root" => "/srv#{job.result_root}" } return job_messages if response["error"]? end @@ -278,6 +279,7 @@ class Sched "job_id" => job_id, "message" => message.to_s, "job_state" => "submit", + "result_root" => "/srv#{job.result_root}" }] end
@@ -441,6 +443,7 @@ class Sched if job job.update({"testbox" => testbox}) job.set_result_root + puts %({"job_id": "#{job_id}", "result_root": "/srv#{job.result_root}", "job_state": "set result root"}) @redis.set_job(job) end return job