[original values] initrds_uri: 'initrd http://172.168.131.113:8800/initrd/osimage/openeuler/aarch64/20.03/20201022....
initrd http://172.168.131.113:8800/initrd/deps/nfs/debian/aarch64/sid/run-ipconfig_...
initrd http://172.17.0.1:8000/os/openeuler/aarch64/20.03/boot/modules-4.19.90-2003....
[now values] - initrd http://172.168.131.113:8800/initrd/osimage/openeuler/aarch64/20.03/20201022.... - initrd http://172.168.131.113:8800/initrd/deps/nfs/debian/aarch64/sid/run-ipconfig_... - initrd http://172.17.0.1:8000/os/openeuler/aarch64/20.03/boot/modules-4.19.90-2003....
Signed-off-by: Bai Jing 799286817@qq.com --- src/lib/job.cr | 8 ++++---- src/scheduler/find_job_boot.cr | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 2a811cb..a4345e0 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -413,7 +413,7 @@ class Job end
private def get_initrds - temp_initrds = [] of String + temp_initrds = [] of String
if "#{os_mount}" == "initramfs" temp_initrds.concat(initramfs_initrds()) @@ -437,13 +437,13 @@ class Job end
private def set_initrds_uri - uris = "" + initrds_uri_values = [] of JSON::Any
get_initrds().each do |initrd| - uris += "initrd #{initrd}\n" + initrds_uri_values << JSON::Any.new("initrd #{initrd}") end
- self["initrds_uri"] = uris + @hash["initrds_uri"] = JSON::Any.new(initrds_uri_values) end
private def set_user_lkp_src diff --git a/src/scheduler/find_job_boot.cr b/src/scheduler/find_job_boot.cr index 9805464..3b68b59 100644 --- a/src/scheduler/find_job_boot.cr +++ b/src/scheduler/find_job_boot.cr @@ -134,7 +134,7 @@ class Sched
private def get_boot_ipxe(job : Job) response = "#!ipxe\n\n" - response += job.initrds_uri + response += Array(String).from_json(job.initrds_uri).join("\n") + "\n" response += job.kernel_uri response += job.kernel_params response += "\nboot\n"