mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Compass-ci

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
compass-ci@openeuler.org

November 2020

  • 29 participants
  • 1194 discussions
[PATCH lkp-tests] tests/build-pkg: fix to create soft link failure
by Liu Shaofei 12 Nov '20

12 Nov '20
[why] the cgz file is not generated, so soft link cannot be created. error messages: ==> ERROR: Failure while downloading avro-c-1.9.2.tar.gz Aborting... ==> /tmp/stderr <== realpath: /initrd/build-pkg/nfs/openeuler/aarch64/20.03/avro-c/HEADCHECK.cgz: No such file or directory ln: failed to create symbolic link '/initrd/build-pkg/nfs/openeuler/aarch64/20.03/avro-c/latest.cgz' -> '': No such file or directory Signed-off-by: Liu Shaofei <liushaofei5(a)huawei.com> --- tests/build-pkg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/build-pkg b/tests/build-pkg index ad8d4843..c29b6a20 100755 --- a/tests/build-pkg +++ b/tests/build-pkg @@ -93,6 +93,8 @@ create_softlink() local soft_path="$PKG_MNT/${pack_to}/${pkgname}" local bm_name=$(basename $(realpath ${cgz_name})) + [ -e "$cgz_name" ] || return 0 + if [ -n "$upstream_tag" ]; then echo "create soft link: ${upstream_tag}.cgz -> ${bm_name}" ln -sf "${bm_name}" "${soft_path}/${upstream_tag}.cgz" -- 2.23.0
2 2
0 0
[PATCH lkp-tests 1/2] add rootfs/tools: build-deps-pkg for rootfs-build-layout
by Sun Yukui 12 Nov '20

12 Nov '20
Automatic packaging when rootfs is built ln -s $LKP_SRC/rootfs/tools/build-deps-pkg.sh \ $CCI_SRC/rootfs/$os_mount/$os/$os_arch/$os_version/build-depends ln -s $LKP_SRC/rootfs/tools/build-deps-pkg.sh \ $CCI_SRC/rootfs/$os_mount/$os/$os_arch/$os_version/build-makepkg Eg: cd $CCI_SRC/rootfs/$os_mount/$os/$os_arch/$os_version and ./build-depends OR ./build-depends $program1 $program2... for depends ./build-makepkg OR ./build-makepkg $program1 $program2... for makepkg Signed-off-by: Sun Yukui <sun.yukui(a)foxmail.com> --- rootfs/tools/build-deps-pkg.sh | 78 ++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 rootfs/tools/build-deps-pkg.sh diff --git a/rootfs/tools/build-deps-pkg.sh b/rootfs/tools/build-deps-pkg.sh new file mode 100755 index 00000000..573414ce --- /dev/null +++ b/rootfs/tools/build-deps-pkg.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# SPDX-License-Identifier: MulanPSL-2.0+ + +# Exclude 'dev' or some files that do not need to perform cci-depends. +suffix_detect() +{ + [ ${1##*.} != $1 ] || [ ${1##*-} == 'dev' ] +} + +submit_job() +{ + command submit "$CCI_SRC/rootfs/build-deps-pkg.yaml" +} + +deps_generate_yaml() +{ + export suite='cci-depends' + + for benchmark + do + suffix_detect "$benchmark" && continue + [ -f "$LKP_SRC/distro/depends/$benchmark" ] || continue + + export benchmark + submit_job + done +} + +pkg_generate_yaml() +{ + export suite='cci-makepkg' + + for benchmark + do + [ -f "$LKP_SRC/pkg/$benchmark/PKGBUILD" ] || continue + + export benchmark + submit_job + done +} + +set_vars() +{ + local work_dir=$(pwd) + local os_path=${work_dir##*/rootfs/} + local os_array=($(echo "$os_path" | tr '/' ' ')) + + [[ "${work_dir}" == "${os_path}" ]] && { + echo "error: script execution path error" + echo "cd ${CCI_SRC}/rootfs/\$os_mount/\$os/\$os_arch/\$os_version; ./${0}" + exit 1 + } + + [[ "${#os_array[@]}" == 4 ]] || { + echo "error: expect 4 parameters, found ${#os_array[@]}" + exit 2 + } + + export os_mount="${os_array[0]}" + export os="${os_array[1]}" + export os_arch="${os_array[2]}" + export os_version="${os_array[3]}" +} + +main() +{ + set_vars + + if [ "$#" -gt 0 ]; then + [[ "$0" == 'build-depends' ]] && deps_generate_yaml "$@" + [[ "$0" == 'build-makepkg' ]] && pkg_generate_yaml "$@" + else + [[ "$0" == 'build-depends' ]] && deps_generate_yaml $(ls "$LKP_SRC"/distro/depends) + [[ "$0" == 'build-makepkg' ]] && pkg_generate_yaml $(ls "$LKP_SRC"/pkg) + fi +} + +main "$@" -- 2.23.0
1 1
0 0
[PATCH compass-ci] fix: scheduler has 'lab' not 'LAB' in environment
by Ren Wen 12 Nov '20

12 Nov '20
Signed-off-by: Ren Wen <15991987063(a)163.com> --- src/scheduler/constants.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler/constants.cr b/src/scheduler/constants.cr index 839c241..41f2c75 100644 --- a/src/scheduler/constants.cr +++ b/src/scheduler/constants.cr @@ -10,7 +10,7 @@ JOB_ES_PORT = 9200 JOB_ES_PORT_DEBUG = 9201 JOB_INDEX_TYPE = "jobs/_doc" -LAB = (ENV.has_key?("LAB") ? ENV["LAB"] : "nolab") +LAB = ENV["lab"]? || "nolab" SCHED_HOST = (ENV.has_key?("SCHED_HOST") ? ENV["SCHED_HOST"] : "172.17.0.1") SCHED_PORT = (ENV.has_key?("SCHED_PORT") ? ENV["SCHED_PORT"] : 3000).to_i32 -- 2.23.0
2 2
0 0
[PATCH compass-ci] src/lib/web_backend.rb: add date range limit feature
by Zhang Yuhang 12 Nov '20

12 Nov '20
[why] The "start_time" field need limit by date. example: GET /get_jobs?upstream_repo=a&page_size=12&start_date=2020-11-03&end_date=2020-11-03 Signed-off-by: Zhang Yuhang <zhangyuhang25(a)huawei.com> --- container/web-backend/web-backend | 57 +++++++++++++++++-------------- src/lib/web_backend.rb | 15 ++++++++ 2 files changed, 46 insertions(+), 26 deletions(-) diff --git a/container/web-backend/web-backend b/container/web-backend/web-backend index fcc765f..7db82ac 100755 --- a/container/web-backend/web-backend +++ b/container/web-backend/web-backend @@ -1,4 +1,6 @@ #!/usr/bin/ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # frozen_string_literal: true require 'sinatra' @@ -12,56 +14,59 @@ set :show_exceptions, false set :environment, :production # GET /compare_candidates -# return: {"query_conditions": {...}, "dimension": [...]} +# Response: +# - {"query_conditions": {...}, "dimension": [...]} get '/compare_candidates' do compare_candidates end # GET /compare?suite=borrow&dimension=tbox_group -# query_conditions: -# > must +# must: +# - query_conditions # - os / os_version / suite / os_arch / tbox_group -# -# dimension: -# > must +# - dimension # - os / os_version / os_arch / suite / tbox_group # -# return: compare result string / "No Data." / "No Difference." +# Response: +# - compare result string / "No Data." / "No Difference." get '/compare' do compare(params) end -# GET /get_jobs?upstream_repo=AvxToNeon/AvxToNeon&page_size=12&page_num=3 -# upstream_repo: -# > optional -# -# page_size: -# > optional +# GET /get_jobs?upstream_repo=a&page_size=12&start_date=2020-11-03&end_date=2020-11-03 +# optional: +# - upstream_repo +# - regex search +# - os +# - os_version +# - os_arch +# - suite +# - category +# - testbox +# - job_state +# - id +# - start_date +# - end_date +# - page_size # - default: 20 -# -# page_num: -# > optional +# - page_num # - default: 1 # -# return: +# Response: # - default: 20 jobs get '/get_jobs' do get_jobs(params) end # GET /get_repos?git_repo=a&page_size=12&page_num=3 -# git_repo: -# > optional -# -# page_size: -# > optional +# optional: +# - git_repo +# - page_size # - default: 20 -# -# page_num: -# > optional +# - page_num # - default: 1 # -# return: +# Response: # - default: 20 repos get '/get_repos' do get_repos(params) diff --git a/src/lib/web_backend.rb b/src/lib/web_backend.rb index 55c5e4a..b8df6f4 100644 --- a/src/lib/web_backend.rb +++ b/src/lib/web_backend.rb @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # frozen_string_literal: true require 'json' @@ -260,6 +262,17 @@ def get_jobs_result(result) jobs end +def get_job_query_range(condition_fields) + range = { start_time: {} } + start_date = condition_fields[:start_date] + end_date = condition_fields[:end_date] + + range[:start_time][:gte] = "#{start_date} 00:00:00" if start_date + range[:start_time][:lte] = "#{end_date} 23:59:59" if end_date + + { range: range } +end + def search_job(condition_fields, page_size, page_num) must = [] FIELDS.each do |field| @@ -272,6 +285,8 @@ def search_job(condition_fields, page_size, page_num) { term: { field => value } } end end + range = get_job_query_range(condition_fields) + must << range if range[:range][:start_time] result, total = es_search(must, page_size, page_num * page_size) return get_jobs_result(result), total end -- 2.23.0
2 2
0 0
[PATCH v5 compass-ci 01/12] mail-robot: run mail-robot service
by Luan Shengde 12 Nov '20

12 Nov '20
call mail-robot.rb parse-apply-account-email.rb gitee-commit-url-check.rb assign-account.rb apply-jumper-account.rb assign-account-email.rb assign-account-fail-eamil.rb to run the email-robot service Signed-off-by: Luan Shengde <shdluan(a)163.com> --- container/mail-robot/run-mail-robot.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 container/mail-robot/run-mail-robot.rb diff --git a/container/mail-robot/run-mail-robot.rb b/container/mail-robot/run-mail-robot.rb new file mode 100755 index 0000000..ab65452 --- /dev/null +++ b/container/mail-robot/run-mail-robot.rb @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +require_relative "#{ENV['CCI_SRC']}/lib/assign-account-email" +require_relative "#{ENV['CCI_SRC']}/lib/assign-account-fail-eamil" +require_relative "#{ENV['CCI_SRC']}/lib/apply-jumper-account" +require_relative "#{ENV['CCI_SRC']}/lib/gitee-commit-url-check.rb" +require_relative "#{ENV['CCI_SRC']}/lib/parse-apply-account-email" +require_relative "#{ENV['CCI_SRC']}/lib/assign-account" +require_relative "#{ENV['CCI_SRC']}/lib/mail-robot" + +MAILDIR = ENV['MAILDIR'] +JUMPER_HOST = ENV['JUMPER_HOST'] || 'api.compass-ci.openeuler.org' +JUMPER_PORT = ENV['JUMPER_PORT'] || 29999 +SEND_MAIL_PORT = ENV['SEND_MAIL_PORT'] || 49000 + +monitor_new_email("#{MAILDIR}/new", "#{MAILDIR}/cur") -- 2.23.0
2 2
0 0
[PATCH v5 compass-ci 07/12] mail-robot: build success email
by Luan Shengde 12 Nov '20

12 Nov '20
build email message for successfully assigning account Signed-off-by: Luan Shengde <shdluan(a)163.com> --- lib/assign-account-email.rb | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 lib/assign-account-email.rb diff --git a/lib/assign-account-email.rb b/lib/assign-account-email.rb new file mode 100755 index 0000000..fd19e10 --- /dev/null +++ b/lib/assign-account-email.rb @@ -0,0 +1,53 @@ +#!/usr/bin/env ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +def build_apply_account_email(my_info) + email_msg = <<~EMAIL_MESSAGE + To: #{my_info['my_email']} + Subject: [compass-ci] Account Ready + + Dear #{my_info['my_name']}, + + Thank you for joining us. + + You can use the following info to submit jobs: + + notice: + the followings are ONE-TIME setup + + 1) setup default config + run the following command to add the below setup to default config file + + mkdir -p ~/.config/compass-ci/defaults/ + cat >> ~/.config/compass-ci/defaults/account.yaml <<-EOF + my_email: #{my_info['my_email']} + my_name: #{my_info['my_name']} + my_uuid: #{my_info['my_uuid']} + EOF + + 2) download lkp-tests and dependencies + run the following command to install the lkp-test and effect the configuration + + git clone https://gitee.com/wu_fengguang/lkp-tests.git + cd lkp-tests + make install + source ${HOME}/.bashrc && source ${HOME}/.bash_profile + + 3) submit job + reference: https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/tutorial.md + + reference to 'how to write job yaml' section to write the job yaml + you can also reference to files in compass-ci/jobs as example. + + submit jobs, for example: + + submit jobs/iperf.yaml textbox=vm-2p8g + + regards + compass-ci + EMAIL_MESSAGE + + return email_msg +end -- 2.23.0
2 2
0 0
[PATCH v5 compass-ci 05/12] mail-robot: check commit url for gitee
by Luan Shengde 12 Nov '20

12 Nov '20
GiteeCommitUrlCheck check commit url availability for hub gitee - clone the repo - check commit log for the commit usage: reference parse-apply-account-email.rb Signed-off-by: Luan Shengde <shdluan(a)163.com> --- lib/gitee-commit-url-check.rb | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 lib/gitee-commit-url-check.rb diff --git a/lib/gitee-commit-url-check.rb b/lib/gitee-commit-url-check.rb new file mode 100755 index 0000000..a9439ad --- /dev/null +++ b/lib/gitee-commit-url-check.rb @@ -0,0 +1,44 @@ +#!/usr/bin/env ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +require 'json' +require 'mail' + +# check commit url availability for hub gitee.com +# gitee_commit_index +# clone the repo +# check commit available +class GiteeCommitUrlCheck + def initialize(my_info, url, base_url) + @my_info = my_info + @url = url + @base_url = base_url + end + + def gitee_commit_index + repo_dir = @url.split('/')[-3] + repo_url = [@base_url, 'git'].join('.') + commit_id = @url.split('/')[-1] + + Dir.chdir '/tmp' + %x(/usr/bin/git clone #{repo_url} #{repo_dir}) + + email_index = %x(/usr/bin/git -C #{repo_dir} show #{commit_id}).index @my_info['my_email'] + + FileUtils.rm_rf repo_dir + + gitee_commit_exist(email_index) + end + + def gitee_commit_exist(email_index) + return unless email_index.nil? + + error_message = "We can not conform whether the commit url matches your email.\n" + error_message += 'Make sure that the commit url is right,' + error_message += ' or it is truely submitted with you email.' + + raise error_message + end +end -- 2.23.0
2 2
0 0
[PATCH v5 compass-ci 04/12] mail-robot: parse apply account email
by Luan Shengde 12 Nov '20

12 Nov '20
ParseApplyAccountEmail parse commit url and pubkey parse commit url check commit url exists check base url in upstream-repos check commit available hub: gitee.com call gitee-commit-url-check to check commit available hub: non-gitee.com check the feedback of curl command to check the commit url available parse pubkey attachment file name: id_rsa.pub usage: reference assign-account.rb Signed-off-by: Luan Shengde <shdluan(a)163.com> --- lib/parse-apply-account-email.rb | 115 +++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100755 lib/parse-apply-account-email.rb diff --git a/lib/parse-apply-account-email.rb b/lib/parse-apply-account-email.rb new file mode 100755 index 0000000..37063e0 --- /dev/null +++ b/lib/parse-apply-account-email.rb @@ -0,0 +1,115 @@ +#!/usr/bin/env ruby +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +require 'json' +require 'mail' + +# parse mail_content +# parse_commit_url +# extract_commit_url +# check commit url exists +# base_url_in_upstream_repos +# check base url in upstream-repos +# commit_url_availability +# check commit available +# parse pub_key +# check pub_key exists +class ParseApplyAccountEmail + def initialize(mail_content) + @mail_content = mail_content + + @my_info = { + 'my_email' => mail_content.from[0], + 'my_name' => mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '') + } + end + + def extract_commit_url + mail_content_body = @mail_content.part[0].part[0].body.decoded || @mail_content.part[0].body.decoded + mail_content_line = mail_content_body.gsub(/\n/, '') + + # the commit url should be headed with a prefix: my oss commit + # the commit url must be in a standart format, example: + # my oss commit: https://github.com/torvalds/aalinux/commit/7be74942f184fdfba34ddd19a0d995de… + no_commit_url unless mail_content_line.match?(%r{my oss commit:\s*https?://[^/]*/[^/]*/[^/]*/commit/[\w\d]{40}}) + + mail_content_body.match(%r{https?://[^/]*/[^/]*/[^/]*/commit/[\w\d]{40}})[0] + end + + def no_commit_url + error_message = "No matched commit url found.\n" + error_message += "Ensure that you have add a right commit url with prefix 'my oss commit:'." + + raise error_message + end + + def parse_commit_url + url = extract_commit_url + base_url = url.gsub(%r{/commit/[\w\d]{40}$}, '') + + base_url_in_upstream_repos('/c/upstream-repos', base_url) + commit_url_availability(url, base_url) + + return url + end + + def base_url_in_upstream_repos(upstream_dir, base_url) + Dir.chdir(upstream_dir) + match_out = %x(grep -rn #{base_url}) + + return unless match_out.empty? + + error_message = "The repo url for your commit is not in our upstream-repo list.\n" + error_message += 'Use a new one, or consulting the manager for available repo list.' + + raise error_message + end + + def commit_url_availability(url, base_url) + hub_name = url.split('/')[2] + + # it requires authentication when execute curl to get the commit infomation + # clone the repo and then validate the commit for the email address + if hub_name.eql? 'gitee.com' + gitee_commit(url, base_url) + else + non_gitee_commit(url) + end + end + + def gitee_commit(url, base_url) + my_gitee_commit = GiteeCommitUrlCheck.new(@my_info, url, base_url) + my_gitee_commit.gitee_commit_index + end + + def non_gitee_commit(url) + url_fdback = %x(curl #{url}) + email_index = url_fdback.index @my_info['my_email'] + + return unless email_index.nil? + + error_message = "We can not confirm the commit url matches your email.\n" + error_message += 'Make sure that the commit url is right,' + error_message += ' or it is truely submitted with you email.' + + raise error_message + end + + def parse_pub_key + pub_key = @mail_content.part[1].body.decoded if @mail_content.part[1].filename == 'id_rsa.pub' + pub_key_exist(pub_key) + + return pub_key + end + + def pub_key_exist(pub_key) + return unless pub_key.nil? + + error_message = "No pub_key found.\n" + error_message += 'Please add the pub_key as an attachment with filename: id_rsa.pub.' + + raise error_message + end +end -- 2.23.0
2 2
0 0
[PATCH compass-ci 4/4] assign-account: add /etc/hostname mapping
by Luan Shengde 12 Nov '20

12 Nov '20
add /etc/hostname mapping for assign-account [why] it's need to get the jumper hostname when generate the rsa private/public key when execute ssh-keygen with -C option in container ssh-keygen -f /home/$login_name/.ssh/id_rsa -N '' -C $login_name@$hostname [how] add file mapping for file /etc/hostname Signed-off-by: Luan Shengde <shdluan(a)163.com> --- container/assign-account/start | 2 ++ 1 file changed, 2 insertions(+) diff --git a/container/assign-account/start b/container/assign-account/start index 2290982..379dbd3 100755 --- a/container/assign-account/start +++ b/container/assign-account/start @@ -14,6 +14,8 @@ cmd=( -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro -v /srv/account-info:/opt/account_data/:rw + -v /etc/hostname:/etc/hostname:ro + -v /etc/localtime:/etc/localtime:ro -v /home:/home:rw -p 29999:29999 assign-account -- 2.23.0
2 2
0 0
[PATCH v2 lkp-tests] tests: adapt the special version of sysbench test
by Zhang Yu 12 Nov '20

12 Nov '20
[why] Use the special version of sysbench test mysql, use different test file are required. [how] Add parameters to test, and use different test file of sysbench Signed-off-by: Zhang Yu <2134782174(a)qq.com> --- tests/sysbench-mysql | 88 ++++++++++++++++++++++++++++++++------------ 1 file changed, 65 insertions(+), 23 deletions(-) diff --git a/tests/sysbench-mysql b/tests/sysbench-mysql index 4ab5b453..db9c57e1 100755 --- a/tests/sysbench-mysql +++ b/tests/sysbench-mysql @@ -1,52 +1,94 @@ #!/bin/sh -# mysql_user -# mysql_host -# mysql_port -# mysql_db -# db_driver # - oltp_test_mode # - oltp_tables_count # - oltp_table_size +# - max_requests +# - mysql_table_engine # - nr_threads +# - rand_type +# - rand_spec_pct # - runtime # - report_interval +# - oltp_read_only +# - events +# mysql_user +# mysql_host +# mysql_port +# mysql_db +# mysql_password +# db_driver : "${mysql_user:=root}" -: "${mysql_host:=localhost}" -: "${mysql_port:=3306}" -: "${mysql_db:=test_1000}" +: "${mysql_host:=$direct_server_ips}" +: "${mysql_port:=$mysql_port}" +: "${mysql_db:=sysbench_1}" +: "${mysql_password:=$mysql_password}" : "${db_driver:=mysql}" -: "${oltp_tables_count:=3}" -: "${oltp_table_size:=1000}" -: "${nr_threads:=64}" -: "${runtime:=120}" -: "${report_interval:=10}" +: "${oltp_test_mode:=complex}" +: "${oltp_tables_count:=1000}" +: "${oltp_table_size:=100000}" +: "${max_requests:=0}" +: "${mysql_table_engine:=innodb}" +: "${rand_type:=special}" +: "${rand_spec_pct:=100}" +: "${nr_threads:=256}" +: "${runtime:=600}" +: "${report_interval:=1}" +: "${oltp_read_only:=off}" +: "${events:=2000000000}" -args=( +args1=( --mysql-user=$mysql_user --mysql-host=$mysql_host --mysql-port=$mysql_port --mysql-db=$mysql_db + --oltp-test-mode=$oltp_test_mode --db-driver=$db_driver - --tables=$oltp_tables_count - --table-size=$oltp_table_size + --mysql-password=$mysql_password + --max-requests=$max_requests + --mysql-table-engine=$mysql_table_engine + --oltp-table-size=$oltp_table_size + --oltp-tables-count=$oltp_tables_count + --rand-type=$rand_type + --rand-spec-pct=$rand_spec_pct --threads=$nr_threads --time=$runtime - --report-interval=$report_interval ) +args2=( + --mysql-user=$mysql_user + --mysql-password=$mysql_password + --mysql-host=$mysql_host + --mysql-port=$mysql_port + --mysql-db=$mysql_db + --threads=$nr_threads + --oltp-read-only=$oltp_read_only + --oltp-table-size=$oltp_table_size + --oltp-tables-count=$oltp_tables_count + --report-interval=$report_interval + --time=$runtime + --events=$events +) +stop_firewalld() +{ + systemctl stop firewalld + iptables -F +} + run_sysbench_step() { - sysbench /usr/share/sysbench/$1 "${args[@]}" $2 + lua_script=$1 + shift + sysbench /usr/local/share/sysbench/tests/include/oltp_legacy/$lua_script "$@" } run_sysbench_mysql() { - systemctl start mysqld - mysql -e "create database test_1000;" - run_sysbench_step oltp_common.lua prepare - run_sysbench_step oltp_read_write.lua run - run_sysbench_step oltp_common.lua cleanup + run_sysbench_step parallel_prepare.lua ${args1[@]} prepare + run_sysbench_step oltp.lua ${args2[@]} run + run_sysbench_step oltp.lua ${args2[@]} cleanup } +stop_firewalld run_sysbench_mysql + -- 2.23.0
2 2
0 0
  • ← Newer
  • 1
  • ...
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • ...
  • 120
  • Older →

HyperKitty Powered by HyperKitty