Please ignore this mail.
On Tue, Sep 29, 2020 at 10:04:30AM +0800, Ren Wen wrote:
- submit all idles jobs once use '*'
-> submit each idle job once until all done. 2) add two fields into job if job's filename is 'multi-qemu.yaml'. 3) add field 'idle_job' for idle jobs, value is always 'true'.
Two extra fields are used for: monitoring logs of virtual machines started by physical machine.
Signed-off-by: Ren Wen 15991987063@163.com
src/lib/sched.cr | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 15f5c9e..6ca20d7 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -467,10 +467,18 @@ class Sched end
def auto_submit_idle_job(tbox_group)
- full_path_patterns = "#{ENV["CCI_REPOS"]}/lab-#{ENV["lab"]}/allot/idle/#{tbox_group}/*.yaml"
- Jobfile::Operate.auto_submit_job(
full_path_patterns,
"testbox: #{tbox_group}") if Dir.glob(full_path_patterns).size > 0
idle_job_path = "#{ENV["CCI_REPOS"]}/lab-#{ENV["lab"]}/allot/idle/#{tbox_group}/"
return nil unless Dir.exists?(idle_job_path)
jobs = Dir[idle_job_path + "*.yaml"]
jobs.each do |job|
extra_job_fields = ["idle_job=true"]
if Path[job].basename == "multi-qemu.yaml"
extra_job_fields += ["FLUENTD_SERVER_HOST=#{ENV["FLUENTD_SERVER_HOST"]}",
"FLUENTD_SERVER_PORT=#{ENV["FLUENTD_SERVER_PORT"]}"]
end
Jobfile::Operate.auto_submit_job(job, "testbox: #{tbox_group}", extra_job_fields)
end end
private def add_kernel_console_param(arch_tmp)
@@ -520,7 +528,7 @@ class Sched "#{JobHelper.service_path("#{SRV_INITRD}/osimage/#{job.os_dir}/vmlinuz")}" else response += "kernel #{os_http_prefix}" +
"#{JobHelper.service_path("#{SRV_OS}/#{job.os_dir}/vmlinuz")}"
end response += " user=lkp" response += " job=/lkp/scheduled/job.yaml RESULT_ROOT=/result/job rootovl ip=dhcp ro""#{JobHelper.service_path("#{SRV_OS}/#{job.os_dir}/vmlinuz")}"
-- 2.23.0