Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com --- providers/my-qemu.sh | 4 +++- providers/qemu.sh | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/my-qemu.sh b/providers/my-qemu.sh index 954d3a0..7f3aa1b 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.aarch64 vm-2p8g~$USER"
$CCI_SRC/providers/qemu.sh diff --git a/providers/qemu.sh b/providers/qemu.sh index d97fd85..9e7627f 100755 --- a/providers/qemu.sh +++ b/providers/qemu.sh @@ -9,6 +9,7 @@ load_cci_defaults
: ${hostname:="vm-1p1g-1"} +: ${queue:="vm-1p1g.$(arch)"} # unicast prefix: x2, x6, xA, xE export mac=$(echo $hostname | md5sum | sed 's/^(..)(..)(..)(..)(..).*$/0a-\1-\2-\3-\4-\5/') echo hostname: $hostname @@ -17,7 +18,15 @@ echo $mac > mac echo "arp -n | grep ${mac//-/:}" > ip.sh chmod +x ip.sh
-curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..." +set_mac2host() +{ + local queues + # use "," replace " " + queues=${queue/ /,} + echo $queues + curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..." +} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*} + host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
maybe you can add some changelog?
On Mon, Oct 26, 2020 at 07:35:08PM +0800, Xiao Shenwei wrote:
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com
providers/my-qemu.sh | 4 +++- providers/qemu.sh | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/my-qemu.sh b/providers/my-qemu.sh index 954d3a0..7f3aa1b 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.aarch64 vm-2p8g~$USER"
what's the usage of var 'queues'? there is only a local var 'queues' in qemu.sh.
-------- Thanks Yu Chuan
$CCI_SRC/providers/qemu.sh diff --git a/providers/qemu.sh b/providers/qemu.sh index d97fd85..9e7627f 100755 --- a/providers/qemu.sh +++ b/providers/qemu.sh @@ -9,6 +9,7 @@ load_cci_defaults
: ${hostname:="vm-1p1g-1"} +: ${queue:="vm-1p1g.$(arch)"} # unicast prefix: x2, x6, xA, xE export mac=$(echo $hostname | md5sum | sed 's/^(..)(..)(..)(..)(..).*$/0a-\1-\2-\3-\4-\5/') echo hostname: $hostname @@ -17,7 +18,15 @@ echo $mac > mac echo "arp -n | grep ${mac//-/:}" > ip.sh chmod +x ip.sh
-curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..." +set_mac2host() +{
- local queues
- # use "," replace " "
- queues=${queue/ /,}
- echo $queues
- curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..."
+} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*}
host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0
On Tue, Oct 27, 2020 at 02:19:18PM +0800, Yu Chuan wrote:
maybe you can add some changelog?
ok,
On Mon, Oct 26, 2020 at 07:35:08PM +0800, Xiao Shenwei wrote:
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com
providers/my-qemu.sh | 4 +++- providers/qemu.sh | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/my-qemu.sh b/providers/my-qemu.sh index 954d3a0..7f3aa1b 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.aarch64 vm-2p8g~$USER"
what's the usage of var 'queues'? there is only a local var 'queues' in
it export to qemu.sh then register mac2queues
Thanks, Shenwei
qemu.sh.
Thanks Yu Chuan
$CCI_SRC/providers/qemu.sh diff --git a/providers/qemu.sh b/providers/qemu.sh index d97fd85..9e7627f 100755 --- a/providers/qemu.sh +++ b/providers/qemu.sh @@ -9,6 +9,7 @@ load_cci_defaults
: ${hostname:="vm-1p1g-1"} +: ${queue:="vm-1p1g.$(arch)"} # unicast prefix: x2, x6, xA, xE export mac=$(echo $hostname | md5sum | sed 's/^(..)(..)(..)(..)(..).*$/0a-\1-\2-\3-\4-\5/') echo hostname: $hostname @@ -17,7 +18,15 @@ echo $mac > mac echo "arp -n | grep ${mac//-/:}" > ip.sh chmod +x ip.sh
-curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..." +set_mac2host() +{
- local queues
- # use "," replace " "
- queues=${queue/ /,}
- echo $queues
- curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..."
+} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*}
host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0
On Tue, Oct 27, 2020 at 02:30:24PM +0800, Xiao Shenwei wrote:
On Tue, Oct 27, 2020 at 02:19:18PM +0800, Yu Chuan wrote:
maybe you can add some changelog?
ok,
On Mon, Oct 26, 2020 at 07:35:08PM +0800, Xiao Shenwei wrote:
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com
providers/my-qemu.sh | 4 +++- providers/qemu.sh | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/my-qemu.sh b/providers/my-qemu.sh index 954d3a0..7f3aa1b 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.aarch64 vm-2p8g~$USER"
what's the usage of var 'queues'? there is only a local var 'queues' in
it export to qemu.sh then register mac2queues
But your qemu.sh only use a local queues, it won't use the export env 'queues'. it's right?
-------- Thanks Yu Chuan
Thanks, Shenwei
qemu.sh.
Thanks Yu Chuan
$CCI_SRC/providers/qemu.sh diff --git a/providers/qemu.sh b/providers/qemu.sh index d97fd85..9e7627f 100755 --- a/providers/qemu.sh +++ b/providers/qemu.sh @@ -9,6 +9,7 @@ load_cci_defaults
: ${hostname:="vm-1p1g-1"} +: ${queue:="vm-1p1g.$(arch)"} # unicast prefix: x2, x6, xA, xE export mac=$(echo $hostname | md5sum | sed 's/^(..)(..)(..)(..)(..).*$/0a-\1-\2-\3-\4-\5/') echo hostname: $hostname @@ -17,7 +18,15 @@ echo $mac > mac echo "arp -n | grep ${mac//-/:}" > ip.sh chmod +x ip.sh
-curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..." +set_mac2host() +{
- local queues
- # use "," replace " "
- queues=${queue/ /,}
- echo $queues
- curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..."
+} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*}
host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0
On Tue, Oct 27, 2020 at 02:36:05PM +0800, Yu Chuan wrote:
On Tue, Oct 27, 2020 at 02:30:24PM +0800, Xiao Shenwei wrote:
On Tue, Oct 27, 2020 at 02:19:18PM +0800, Yu Chuan wrote:
maybe you can add some changelog?
ok,
On Mon, Oct 26, 2020 at 07:35:08PM +0800, Xiao Shenwei wrote:
Signed-off-by: Xiao Shenwei xiaoshenwei96@163.com
providers/my-qemu.sh | 4 +++- providers/qemu.sh | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/providers/my-qemu.sh b/providers/my-qemu.sh index 954d3a0..7f3aa1b 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.aarch64 vm-2p8g~$USER"
what's the usage of var 'queues'? there is only a local var 'queues' in
it export to qemu.sh then register mac2queues
But your qemu.sh only use a local queues, it won't use the export env 'queues'. it's right?
ok !!!
Thanks, Shenwei
Thanks Yu Chuan
Thanks, Shenwei
qemu.sh.
Thanks Yu Chuan
$CCI_SRC/providers/qemu.sh diff --git a/providers/qemu.sh b/providers/qemu.sh index d97fd85..9e7627f 100755 --- a/providers/qemu.sh +++ b/providers/qemu.sh @@ -9,6 +9,7 @@ load_cci_defaults
: ${hostname:="vm-1p1g-1"} +: ${queue:="vm-1p1g.$(arch)"} # unicast prefix: x2, x6, xA, xE export mac=$(echo $hostname | md5sum | sed 's/^(..)(..)(..)(..)(..).*$/0a-\1-\2-\3-\4-\5/') echo hostname: $hostname @@ -17,7 +18,15 @@ echo $mac > mac echo "arp -n | grep ${mac//-/:}" > ip.sh chmod +x ip.sh
-curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..." +set_mac2host() +{
- local queues
- # use "," replace " "
- queues=${queue/ /,}
- echo $queues
- curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..."
+} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*}
host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0
+set_mac2host() +{
- local queues
- # use "," replace " "
- queues=${queue/ /,}
btw, ${aa/ /,} will only replace first space, and will only replace one space. ${aa/ /,}: "a b c" => "a,b c" ${aa// /,}: "a b c" => "a,b,c" ${aa// /,}: "a b c" => "a,,b,,c"
maybe you can use the follow method: echo $yca | sed -r 's/ +/,/g'
-------- Thanks Yu Chuan
- echo $queues
- curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..."
+} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*}
host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0
On Tue, Oct 27, 2020 at 03:59:36PM +0800, Yu Chuan wrote:
+set_mac2host() +{
- local queues
- # use "," replace " "
- queues=${queue/ /,}
btw, ${aa/ /,} will only replace first space, and will only replace one space. ${aa/ /,}: "a b c" => "a,b c" ${aa// /,}: "a b c" => "a,b,c" ${aa// /,}: "a b c" => "a,,b,,c"
maybe you can use the follow method: echo $yca | sed -r 's/ +/,/g'
well done.
nice !!!
Thanks, Shenwei
Thanks Yu Chuan
- echo $queues
- curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..."
+} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*}
host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0