before: submit host-info.yaml os_arch=x86_64 arch=x86_64 after: submit host-info.yaml arch=x86_64
[why] when submit job to docker testbox in x86_64 machine, must use params both os_arch and arch, or failed to submit and consume job, now just assign value to arch.
Signed-off-by: Liu Yinsi liuyinsi@163.com --- src/lib/job.cr | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 200ba2b1..bb4ef967 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -151,6 +151,7 @@ class Job
private def set_defaults append_init_field() + set_os_arch() set_docker_os() set_user_lkp_src() set_os_mount() @@ -174,6 +175,10 @@ class Job self[key] = Time.local.to_s("%Y-%m-%dT%H:%M:%S+0800") end
+ private def set_os_arch + self["os_arch"] = @hash["arch"].to_s if @hash.has_key?("arch") + end + private def set_docker_os return unless is_docker_job?