On Tue, Nov 03, 2020 at 12:04:45PM +0800, Wu Fengguang wrote:
On Tue, Nov 03, 2020 at 10:11:46AM +0800, Xiao Shenwei wrote:
[why] specify the VM that need to consume the queues one job will added one queue, but one VM can consume job from multi queues.
[how] to solve this problem, the scheduler should obtains which queues should be request. solution-1: register mac hostname and queues relation before: mac2host change to: mac2host and host2queues then scheduler can get queues based on mac solution-2: /boot.ipxe/mac/${mac}?queues=xxx,yyy our HW and PXE-VM use /tftpboot/boot.ipxe to send request, unable to specify parameter, so solution-1 may be better.
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com
providers/my-qemu.sh | 4 +++- providers/qemu.sh | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/providers/my-qemu.sh b/providers/my-qemu.sh index 954d3a0..f42a1fd 100755 --- a/providers/my-qemu.sh +++ b/providers/my-qemu.sh @@ -4,6 +4,8 @@
[[ $tbox_group ]] || tbox_group=vm-2p8g -export hostname=$tbox_group--$USER-$$ +export hostname=$tbox_group.$USER-$$
+# specify which queues will be request, use " " to separate more than 2 values +export queues="vm-2p8g~$USER vm-2p8g.aarch64"
Please remove vm-2p8g.aarch64 -- it's against the purpose of 'my-qemu' -- it's no long MY qemu dedeciated for consuming MY jobs.
got it,
- # use "," replace " "
- queues=$(echo $queues | sed -r 's/ +/,/g')
bash can do the replace
local api_queues=${queues// /,}
use this way may cause: queues="a b c" echo ${queues// /,} a,b,,c
Thanks, Shenwei
Don't overwrite the original $queues.
${queues} => $api_queues
Thanks, Fengguang