[PATCH v2 compass-ci 1/3] sched: response ipxe_response value if ipxe_response field in job yaml

Signed-off-by: Cao Xueliang <caoxl78320@163.com> --- src/scheduler/find_job_boot.cr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scheduler/find_job_boot.cr b/src/scheduler/find_job_boot.cr index 9e2898e..e8d590b 100644 --- a/src/scheduler/find_job_boot.cr +++ b/src/scheduler/find_job_boot.cr @@ -160,6 +160,8 @@ class Sched end private def get_boot_ipxe(job : Job) + return job["ipxe_response"] if job["ipxe_response"]? + response = "#!ipxe\n\n" _initrds_uri = Array(String).from_json(job.initrds_uri).map { |uri| "initrd #{uri}" } -- 2.23.0

maybe you can add the background as follows: [Why] When we run some special job, we need to customize the response of ipxe. So add support `ipxe_response` field, if there is this field in job.yaml, the value of this field will be returned directly when testbox requests for job. -------- Thanks Yu Chuan On Wed, Feb 24, 2021 at 05:16:25PM +0800, Cao Xueliang wrote:
Signed-off-by: Cao Xueliang <caoxl78320@163.com> --- src/scheduler/find_job_boot.cr | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/scheduler/find_job_boot.cr b/src/scheduler/find_job_boot.cr index 9e2898e..e8d590b 100644 --- a/src/scheduler/find_job_boot.cr +++ b/src/scheduler/find_job_boot.cr @@ -160,6 +160,8 @@ class Sched end
private def get_boot_ipxe(job : Job) + return job["ipxe_response"] if job["ipxe_response"]? + response = "#!ipxe\n\n"
_initrds_uri = Array(String).from_json(job.initrds_uri).map { |uri| "initrd #{uri}" } -- 2.23.0

On Wed, Feb 24, 2021 at 05:50:40PM +0800, Yu Chuan wrote:
maybe you can add the background as follows:
[Why] When we run some special job, we need to customize the response of ipxe.
So add support `ipxe_response` field, if there is this field in job.yaml, the value of this field will be returned directly when testbox requests for job.
The why has show in the subject, special job is not enough, you should give the suite. Thanks, Xueliang
-------- Thanks Yu Chuan
On Wed, Feb 24, 2021 at 05:16:25PM +0800, Cao Xueliang wrote:
Signed-off-by: Cao Xueliang <caoxl78320@163.com> --- src/scheduler/find_job_boot.cr | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/scheduler/find_job_boot.cr b/src/scheduler/find_job_boot.cr index 9e2898e..e8d590b 100644 --- a/src/scheduler/find_job_boot.cr +++ b/src/scheduler/find_job_boot.cr @@ -160,6 +160,8 @@ class Sched end
private def get_boot_ipxe(job : Job) + return job["ipxe_response"] if job["ipxe_response"]? + response = "#!ipxe\n\n"
_initrds_uri = Array(String).from_json(job.initrds_uri).map { |uri| "initrd #{uri}" } -- 2.23.0
participants (2)
-
Cao Xueliang
-
Yu Chuan