For multi-device tests.
Signed-off-by: Ren Wen renwen8@huawei.com Signed-off-by: Bai Jing baijing14@huawei.com --- src/scheduler/scheduler.cr | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/src/scheduler/scheduler.cr b/src/scheduler/scheduler.cr index 0527bad..e917c98 100644 --- a/src/scheduler/scheduler.cr +++ b/src/scheduler/scheduler.cr @@ -154,4 +154,20 @@ module Scheduler sched.update_tbox_wtmp(env) "Done" end + + # cluster hosts report their states and request cluster state + # ~lkp/cgi-bin/lkp-cluster-sync?cluster=cs-lkp-hsw-ep5& + # node=vm-hi1620-1p1g--xx& + # state=wait_ready& + # ... + # function: handle_request + # return response according to different request state + # request state: + # wait_ready | abort | write_state | roles_ip | + # failed | finished | wait_finish + get "/~lkp/cgi-bin/lkp-cluster-sync" do |env| + respon = sched.handle_request(env.params) + debug_message(env, respon) + respon + end end
title: feat: scheduler: cluster sync API for multi-test
On Fri, Aug 21, 2020 at 03:16:31PM +0800, Ren Wen wrote:
For multi-device tests.
Signed-off-by: Ren Wen renwen8@huawei.com Signed-off-by: Bai Jing baijing14@huawei.com
src/scheduler/scheduler.cr | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/src/scheduler/scheduler.cr b/src/scheduler/scheduler.cr index 0527bad..e917c98 100644 --- a/src/scheduler/scheduler.cr +++ b/src/scheduler/scheduler.cr @@ -154,4 +154,20 @@ module Scheduler sched.update_tbox_wtmp(env) "Done" end
- # cluster hosts report their states and request cluster state
- # ~lkp/cgi-bin/lkp-cluster-sync?cluster=cs-lkp-hsw-ep5&
- # node=vm-hi1620-1p1g--xx&
- # state=wait_ready&
- # ...
- # function: handle_request
- # return response according to different request state
response according to "all cluster node state" give more special examples.
all_ready -> ready 1 abort -> abort ...
- # request state:
- # wait_ready | abort | write_state | roles_ip |
- # failed | finished | wait_finish
- get "/~lkp/cgi-bin/lkp-cluster-sync" do |env|
respon = sched.handle_request(env.params)
1) response 2) only this will make build failed (must define handle_request too) 3) function need name maybe sync_cluster(env)
debug_message(env, respon)
respon
- end
end
2.23.0