Fix this to adapt the changes to job fields: - 'kernel_uri' - 'kernel_params' - 'initrds_uri'
Signed-off-by: Ren Wen 15991987063@163.com --- src/scheduler/find_job_boot.cr | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/scheduler/find_job_boot.cr b/src/scheduler/find_job_boot.cr index b2f0802..5e6044a 100644 --- a/src/scheduler/find_job_boot.cr +++ b/src/scheduler/find_job_boot.cr @@ -158,9 +158,13 @@ class Sched
private def get_boot_ipxe(job : Job) response = "#!ipxe\n\n" - response += Array(String).from_json(job.initrds_uri).join("\n") + "\n" - response += job.kernel_uri + " " - response += Array(String).from_json(job.kernel_params).join(" ") + + _initrds_uri = Array(String).from_json(job.initrds_uri).map { |uri| "initrd #{uri}" } + response += _initrds_uri.join("\n") + "\n" + + _kernel_params = ["kernel #{job.kernel_uri}"] + Array(String).from_json(job.kernel_params) + Array(String).from_json(job.ipxe_kernel_params) + response += _kernel_params.join(" ") + response += "\nboot\n"
return response