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 -----
  • June
  • 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

  • 5231 discussions
[PATCH v3 compass-ci 1/2] auto group jobs with user-defined template
by Lu Weitao 03 Nov '20

03 Nov '20
auto group jobs(query form ES) with user-defined template background: For support compare with user-defined template feature, the work-flow are: load_compare_template.yaml --> query_results(ES) ---> auto group jobs_list ---> create groups_matrices ---> compare_values by each metrics ---> format/show results current patch is the step: auto group jobs_list Signed-off-by: Lu Weitao <luweitaobe(a)163.com> --- lib/params_group.rb | 121 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/lib/params_group.rb b/lib/params_group.rb index 0f07d26..15bc2dd 100644 --- a/lib/params_group.rb +++ b/lib/params_group.rb @@ -2,7 +2,7 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # frozen_string_literal: true -# Exammple: +# Example: # Input: jobs_list. The results of ES query. # # eg: [ jobs1, jobs2, ...... ] @@ -113,3 +113,122 @@ end def remove_singleton(groups) groups.delete_if { |_k, v| v.length < 2 } end + +# -------------------------------------------------------------------------------------------------- +# auto group job_list by user's template +# Example: +# Input: +# 1. jobs_list. +# 2. params from user's template that include: +# groups_params(x_params): +# eg: ['block_size', 'package_size'] +# dimensions: +# eg: [ +# {'os' => 'openeuler', 'os_version' => '20.03'}, +# {'os' => 'centos', 'os_version' => '7.6'} +# ] +# metrics: +# eg: ['fio.read_iops', 'fio_write_iops'] +# Output: +# eg: +# { +# '4K|1G' => { +# 'openeuler 20.03' => [ +# {'stats' => {'fio.write_iops' => 312821.002387, 'fio.read_iops' => 212821.2387}}, +# {'stats' => {'fio.write_iops' => 289661.878453}}, +# ... +# ], +# 'centos 7.6' => [...] +# }, +# '16K|1G' => {...}, +# ... +# } + +# auto_group_by_template: auto group job_list by user's template +def auto_group_by_template(jobs_list, group_params, dimensions, metrics) + job_list = extract_jobs_list(jobs_list) + get_group_by_template(job_list, group_params, dimensions, metrics) +end + +def get_group_by_template(job_list, group_params, dimensions, metrics) + groups = {} + job_list.each do |job| + next unless job['stats'] + + group_key = get_user_group_key(job, group_params) + dimension = get_user_dimension(job, dimensions) + next unless group_key && dimension + + new_job = get_new_job_by_metrics(job, metrics) + next if new_job.empty? + + groups[group_key] ||= {} + groups[group_key][dimension] ||= [] + groups[group_key][dimension] << new_job + end + groups +end + +# @group_params Array(String) +# eg: +# ['block_size', 'package_size'] +# return eg: +# '4K|1G' +def get_user_group_key(job, group_params) + group_key_list = [] + group_params.each do |param| + if job.key?(param) + group_key_list << job[param] + next + end + job.each_value do |v| + if v.is_a?(Hash) && v.key?(param) + group_key_list << v[param] + break + end + end + end + return nil if group_key_list.size < group_params.size || group_key_list.empty? + + group_key_list.join('|') +end + +# @dimension Array(Hash) +# eg: +# [ +# {os => openeuler, os_version => 20.03}, +# {os => centos, os_version => 7.6} +# ] +# return eg: +# 'openeuler 20.03' +def get_user_dimension(job, dimensions) + dimension_list = [] + dimensions.each do |dim| + dim.each do |key, value| + if job[key] == value + dimension_list << value + end + end + return nil if !dimension_list.empty? && dimension_list.size < dim.size + end + return nil if dimension_list.empty? + + dimension_list.join(' ') +end + +# @metrics Array(String) +# eg: +# ["fio.read_iops", "fio.write_iops"] +# return new_job +# eg: +# {'stats' => {'fio.write_iops' => 312821.002387, 'fio.read_iops' => 212821.2387}}, +def get_new_job_by_metrics(job, metrics) + new_job = {} + metrics.each do |metric| + if job['stats'].key?(metric) + new_job['stats'] ||= {} + new_job['stats'][metric] = job['stats'][metric] + end + end + new_job +end -- 2.23.0
3 4
0 0
[PATCH compass-ci 2/8] container/mail-robot: apply-account.rb
by Luan Shengde 03 Nov '20

03 Nov '20
check to assign account invoke ParseApplyAccountEmail to parse commit url and pubkey generate uuid and invoke ApplyAccount to apply account store account info to es send uuid Signed-off-by: Luan Shengde <luanshengde2(a)huawei.com> --- container/mail-robot/apply-account.rb | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 container/mail-robot/apply-account.rb diff --git a/container/mail-robot/apply-account.rb b/container/mail-robot/apply-account.rb new file mode 100755 index 0000000..55245ac --- /dev/null +++ b/container/mail-robot/apply-account.rb @@ -0,0 +1,71 @@ +#!/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' +require_relative "../../lib/es_client.rb" + +# assign uuid/account +class AssignAccount + def initialize(mail_content) + @mail_content = mail_content + @my_email = mail_content.from[0] + @my_name = mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '') + @send_mail_host = %x(/sbin/ip route |awk '/default/ {print $3}').chomp + end + + def check_to_send_account + my_commit_url, pub_key = check_out_commit_url_pub_key + my_uuid, acct_infos = check_to_apply_account(pub_key) + + my_info = { + 'my_email' => @my_email, + 'my_name' => @my_name, + 'my_commit_url' => my_commit_url, + 'my_login_name' => acct_infos['account'], + 'my_uuid' => my_uuid + } + store_account_info(my_info) + my_info['acct_infos'] = acct_infos + send_my_uuid(my_info) + end + + def check_out_commit_url_pub_key + parse_apply_account_email = ParseApplyAccountEmail.new(@mail_content) + my_commit_url, pub_key = parse_apply_account_email.parse_commit_url_pub_key + + return my_commit_url, pub_key + end + + def check_to_apply_account(pub_key) + my_uuid = %x(uuidgen).chomp + apply_account_info = { + 'my_email' => @my_email, + 'my_name' => @my_name, + 'my_uuid' => my_uuid, + 'my_ssh_pubkey' => pub_key + } + apply_account = ApplyAccount.new(apply_account_info) + acct_infos = apply_account.apply_jumper_account + + return my_uuid, acct_infos + end + + def store_account_info(my_info) + es = ESClient.new(index: 'accounts') + es.put_source_by_id(my_info['my_email'], my_info) + end + + def send_my_uuid(my_info) + send_uuid_email_info = { + 'my_email' => @my_email, + 'my_name' => @my_name, + 'my_info' => my_info, + 'error_message' => '' + } + send_uuid = SendMail.new(send_uuid_email_info) + send_uuid.send_uuid_email + end +end -- 2.23.0
2 3
0 0
[PATCH compass-ci] monitoring/filter.cr: query value support regularity
by Wu Zhende 03 Nov '20

03 Nov '20
[Why] Enhanced monitoring function. Regular expressions can be used in query's value. query can be {"job_id": "z9.*"} Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- src/monitoring/filter.cr | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/monitoring/filter.cr b/src/monitoring/filter.cr index bc6f901..5ddd547 100644 --- a/src/monitoring/filter.cr +++ b/src/monitoring/filter.cr @@ -56,12 +56,20 @@ class Filter def match_query(query : Hash(String, JSON::Any), msg : Hash(String, JSON::Any)) query.each do |key, value| + return false unless msg.has_key?(key) + value = value.as_a - if value.includes?(nil) - return false unless msg.has_key?(key) - else - return false unless value.includes?(msg[key]?) + next if value.includes?(nil) + next if value.includes?(msg[key]?) + + flag = false + value.each do |val| + if msg[key]?.to_s =~ /#{val}/ + flag = true + break + end end + return false unless flag end return true end -- 2.23.0
1 0
0 0
[PATCH v9 compass-ci 1/2] job.cr: add a key "kernel_version" for initramfs
by Xu Xijian 03 Nov '20

03 Nov '20
When run job with initramfs, there is a default combination of kernel, modules and headers, and I add a key "kernel_version" to make it optional. Signed-off-by: Xu Xijian <hdxuxijian(a)163.com> --- src/lib/job.cr | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 1e49da6..6309809 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -87,6 +87,10 @@ class Job kernel_append_root kernel_params docker_image + kernel_version + linux_vmlinuz_path + linux_modules_initrd + linux_headers_initrd ) macro method_missing(call) @@ -135,6 +139,7 @@ class Job set_result_service() set_os_mount() set_depends_initrd() + set_kernel_version() set_initrds_uri() set_kernel_uri() set_kernel_append_root() @@ -293,9 +298,17 @@ class Job return true end + private def set_kernel_version + boot_dir = "#{SRV_OS}/#{os_dir}/boot" + suffix = "-#{kernel_version}" if self["kernel_version"]? + self["linux_vmlinuz_path"] = File.real_path("#{boot_dir}/vmlinuz#{suffix}") + self["linux_modules_initrd"] = File.real_path("#{boot_dir}/modules#{suffix}.cgz") + self["linux_headers_initrd"] = File.real_path("#{boot_dir}/headers#{suffix}.cgz") + end + private def set_kernel_uri self["kernel_uri"] = "kernel #{OS_HTTP_PREFIX}" + - "#{JobHelper.service_path("#{SRV_OS}/#{os_dir}/vmlinuz")}" + "#{JobHelper.service_path("#{linux_vmlinuz_path}")}" end private def common_initrds @@ -316,6 +329,10 @@ class Job "#{JobHelper.service_path("#{osimage_dir}/current")}" temp_initrds << "#{INITRD_HTTP_PREFIX}" + "#{JobHelper.service_path("#{osimage_dir}/run-ipconfig.cgz")}" + temp_initrds << "#{OS_HTTP_PREFIX}" + + "#{JobHelper.service_path("#{linux_modules_initrd}")}" + temp_initrds << "#{OS_HTTP_PREFIX}" + + "#{JobHelper.service_path("#{linux_headers_initrd}")}" temp_initrds.concat(initrd_deps.split(/ /)) unless initrd_deps.empty? temp_initrds.concat(initrd_pkg.split(/ /)) unless initrd_pkg.empty? -- 2.23.0
1 0
0 0
[PATCH v3 compass-ci 3/3] container/assign-account: answerback-email.rb
by Luan Shengde 03 Nov '20

03 Nov '20
1. disable use golbal variable apply_info [why] Style/GlobalVars: Do not introduce global variables. [how] use local variables instead of global variables 2. enable transfer user info when execute apply account command [why] when applying account, the assign-account service will write the my info to user's default config file ~/.config/compass-ci/defaults/account.yaml my info: - my_email - my_name - my_uuid [how] transfer the user info along with the pub_key when sending apply account request. Signed-off-by: Luan Shengde <luanshengde2(a)huawei.com> --- container/assign-account/answerback-email.rb | 80 ++++++++++++-------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/container/assign-account/answerback-email.rb b/container/assign-account/answerback-email.rb index bb8e809..5e6cc58 100755 --- a/container/assign-account/answerback-email.rb +++ b/container/assign-account/answerback-email.rb @@ -12,35 +12,38 @@ require 'mail' require 'set' require 'optparse' require_relative '../defconfig' +require_relative '../../lib/es_client' names = Set.new %w[ JUMPER_HOST JUMPER_PORT - SEND_MAIL_HOST_INTERNET - SEND_MAIL_PORT_INTERNET + SEND_MAIL_HOST + SEND_MAIL_PORT ] defaults = relevant_defaults(names) JUMPER_HOST = defaults['JUMPER_HOST'] || 'api.compass-ci.openeuler.org' JUMPER_PORT = defaults['JUMPER_PORT'] || 29999 -SEND_MAIL_HOST = defaults['SEND_MAIL_HOST_INTERNET'] || 'localhost' -SEND_MAIL_PORT = defaults['SEND_MAIL_PORT_INTERNET'] || 11312 +SEND_MAIL_HOST = defaults['SEND_MAIL_HOST'] || 'localhost' +SEND_MAIL_PORT = defaults['SEND_MAIL_PORT'] || 49000 -$apply_info = { +apply_info = { 'my_email' => nil, + 'my_name' => nil, + 'my_uuid' => %x(uuidgen).chomp, 'my_ssh_pubkey' => nil } -def init_info(email_file) +def init_info(email_file, apply_info) mail_content = Mail.read(email_file) + apply_info['my_email'] = mail_content.from[0] + apply_info['my_name'] = mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '') + apply_info['my_ssh_pubkey'] = if mail_content.part[1].filename == 'id_rsa.pub' + mail_content.part[1].body.decoded + end - $apply_info['my_email'] = mail_content.from[0] - $apply_info['my_ssh_pubkey'] = if mail_content.part[1].filename == 'id_rsa.pub' - mail_content.part[1].body.decoded.gsub(/\r|\n/, '') - end - - $apply_info + apply_info end options = OptionParser.new do |opts| @@ -52,15 +55,17 @@ options = OptionParser.new do |opts| opts.separator 'options:' opts.on('-e|--email email_address', 'appoint email address') do |email_address| - $apply_info['my_email'] = email_address + apply_info['my_email'] = email_address + # when apply account with email address, will get no user name + apply_info['my_name'] = '' end opts.on('-s|--ssh-pubkey pub_key_file', 'ssh pub_key file, enable password-less login') do |pub_key_file| - $apply_info['my_ssh_pubkey'] = File.read(pub_key_file) + apply_info['my_ssh_pubkey'] = File.read(pub_key_file) end opts.on('-f|--raw-email email_file', 'email file') do |email_file| - init_info(email_file) + init_info(email_file, apply_info) end opts.on_tail('-h|--help', 'show this message') do @@ -71,10 +76,10 @@ end options.parse!(ARGV) -def build_message(email, acct_infos) +def build_message(email, account_info) message = <<~EMAIL_MESSAGE To: #{email} - Subject: jumper account is ready + Subject: [compass-ci] jumper account is ready Dear user: @@ -82,10 +87,10 @@ def build_message(email, acct_infos) You can use the following command to login the jumper server: login command: - ssh -p #{acct_infos['jumper_port']} #{acct_infos['account']}@#{acct_infos['jumper_ip']} + ssh -p #{account_info['jumper_port']} #{account_info['my_login_name']}@#{account_info['jumper_host']} account password: - #{acct_infos['passwd']} + #{account_info['my_password']} regards compass-ci @@ -94,26 +99,37 @@ def build_message(email, acct_infos) return message end -def account_info(pub_key) - account_info_str = if pub_key.nil? - %x(curl -XGET '#{JUMPER_HOST}:#{JUMPER_PORT}/assign_account') - else - %x(curl -XGET '#{JUMPER_HOST}:#{JUMPER_PORT}/assign_account' -d "pub_key: #{pub_key}") - end +def apply_account(apply_info) + account_info_str = %x(curl -XGET '#{JUMPER_HOST}:#{JUMPER_PORT}/assign_account' -d '#{apply_info.to_json}') JSON.parse account_info_str end -def send_account +def send_account(apply_info) message = "No email address specified\n" message += "use -e email_address add a email address\n" message += 'or use -f to add a email file' - raise message if $apply_info['my_email'].nil? - - acct_info = account_info($apply_info['my_ssh_pubkey']) - - message = build_message($apply_info['my_email'], acct_info) + raise message if apply_info['my_email'].nil? + + account_info = apply_account(apply_info) + my_info = { + 'my_email' => apply_info['my_email'], + 'my_name' => apply_info['my_name'], + # there is no need to add a commit url for this tool + # the es has the key: my_commit_url + 'my_commit_url' => '', + 'my_login_name' => account_info['my_login_name'], + 'my_uuid' => apply_info['my_uuid'] + } + + store_account_info(my_info) + message = build_message(apply_info['my_email'], account_info) %x(curl -XPOST '#{SEND_MAIL_HOST}:#{SEND_MAIL_PORT}/send_mail_text' -d "#{message}") end -send_account +def store_account_info(my_info) + es = ESClient.new(index: 'accounts') + es.put_source_by_id(my_info['my_email'], my_info) +end + +send_account(apply_info) -- 2.23.0
1 0
0 0
[PATCH v3 compass-ci 2/3] container/assign-account: get_account_info
by Luan Shengde 03 Nov '20

03 Nov '20
add new function: config default yaml file [why]: easier for user to config the default yaml file [how]: parse received data and extract the user infos store user infos to defaults yaml file: ~/.config/compass-ci/default/account.yaml include: - my_email - my_name - my_uuid Signed-off-by: Luan Shengde <luanshengde2(a)huawei.com> --- container/assign-account/get_account_info.rb | 50 +++++++++++++------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/container/assign-account/get_account_info.rb b/container/assign-account/get_account_info.rb index 2f93d5b..51e3e03 100755 --- a/container/assign-account/get_account_info.rb +++ b/container/assign-account/get_account_info.rb @@ -44,6 +44,8 @@ the returned data for setup_jumper_account_info like: =end +require 'fileutils' + # get jumper and account info class AccountStorage ACCOUNT_DIR = '/opt/account_data/' @@ -93,35 +95,49 @@ class AccountStorage def setup_jumper_account_info account_info = read_account_info jumper_info = read_jumper_info - pub_key = @data['pub_key'] unless @data.nil? - - jumper_ip = jumper_info[0].chomp - jumper_port = jumper_info[1].chomp - account = account_info[0] - passwd = if pub_key.nil? - account_info[1] - else - 'Use pub_key to login' - end + pub_key = @data['my_ssh_pubkey'] unless @data['my_ssh_pubkey'].nil? + + jumper_host = jumper_info[0].chomp + jumper_port = jumper_info[1].chomp + login_name = account_info[0] + password = if pub_key.nil? + account_info[1] + else + 'Use pub_key to login' + end jumper_account_info = { - 'account' => account, - 'passwd' => passwd, - 'jumper_ip' => jumper_ip, + 'my_login_name' => login_name, + 'my_password' => password, + 'jumper_host' => jumper_host, 'jumper_port' => jumper_port } - setup_authorized_key(account, pub_key) + setup_authorized_key(login_name, pub_key) unless pub_key.nil? + setup_default_yaml(login_name) + return jumper_account_info end - def setup_authorized_key(account, pub_key) - ssh_dir = File.join('/home/', account, '.ssh') + def setup_default_yaml(login_name) + default_yaml_dir = File.join('/home', login_name, '.config/compass-ci/defaults') + FileUtils.mkdir_p default_yaml_dir + + File.open("#{default_yaml_dir}/account.yaml", 'a') do |file| + file.puts "my_email: #{@data['my_email']}" + file.puts "my_name: #{@data['my_name']}" + file.puts "my_uuid: #{@data['my_uuid']}" + end + %x(chown -R #{login_name}:#{login_name} "/home/#{login_name}/.config") + end + + def setup_authorized_key(login_name, pub_key) + ssh_dir = File.join('/home/', login_name, '.ssh') Dir.mkdir ssh_dir, 0o700 Dir.chdir ssh_dir f = File.new('authorized_keys', 'w') f.puts pub_key f.close File.chmod 0o600, 'authorized_keys' - %x(chown -R #{account}:#{account} #{ssh_dir}) + %x(chown -R #{login_name}:#{login_name} #{ssh_dir}) end end -- 2.23.0
1 0
0 0
[PATCH v3 compass-ci 1/3] container/assign-account: assign-account.rb
by Luan Shengde 03 Nov '20

03 Nov '20
disable assigning account for user if there is no: - my_email - my_name - my_uuid [why]: my_email, my_name, my_uuid is required when initialize the default config file [how] check if the parsed data has keys: - my_email - my_name - my_uuid Signed-off-by: Luan Shengde <luanshengde2(a)huawei.com> --- container/assign-account/assign-account.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/container/assign-account/assign-account.rb b/container/assign-account/assign-account.rb index e356c18..9481068 100755 --- a/container/assign-account/assign-account.rb +++ b/container/assign-account/assign-account.rb @@ -7,7 +7,7 @@ require 'sinatra' require 'open3' require 'json' require 'yaml' -require_relative 'get_account_info.rb' +require_relative 'get_account_info' set :bind, '0.0.0.0' set :port, 29999 @@ -17,8 +17,22 @@ get '/assign_account' do data = YAML.safe_load request.body.read rescue StandardError => e puts e.message + puts e.backtrace end + check_to_assign_account(data) +end + +def check_to_assign_account(data) + error_message = 'lack of my infos: my_email' + raise error_message unless data.key? 'my_email' + + error_message = 'lack of my infos: my_name' + raise error_message unless data.key? 'my_name' + + error_message = 'lack of my infos: my_uuid' + raise error_message unless data.key? 'my_uuid' + ref_account_info = AccountStorage.new(data) account_info = ref_account_info.setup_jumper_account_info -- 2.23.0
1 0
0 0
[PATCH compass-ci] taskqueue_api: each interface uses its own client to request taskqueue
by Cao Xueliang 03 Nov '20

03 Nov '20
[why] Different interfaces use one client may get incorrect data. So, each interface uses its own client to request taskqueue and close it when finish the request. Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- src/lib/taskqueue_api.cr | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/lib/taskqueue_api.cr b/src/lib/taskqueue_api.cr index a8bbf16..f447266 100644 --- a/src/lib/taskqueue_api.cr +++ b/src/lib/taskqueue_api.cr @@ -17,20 +17,23 @@ end class TaskQueueAPI def initialize - port = ENV.has_key?("TASKQUEUE_PORT") ? ENV["TASKQUEUE_PORT"].to_i32 : 3060 - host = ENV.has_key?("TASKQUEUE_HOST") ? ENV["TASKQUEUE_HOST"] : "172.17.0.1" - @client = HTTP::Client.new(host, port: port) + @port = ENV.has_key?("TASKQUEUE_PORT") ? ENV["TASKQUEUE_PORT"].to_i32 : 3060 + @host = ENV.has_key?("TASKQUEUE_HOST") ? ENV["TASKQUEUE_HOST"] : "172.17.0.1" end def add_task(service_queue_path : String, task : JSON::Any) params = HTTP::Params.encode({"queue" => service_queue_path}) - response = loop_till_connectable { @client.post("/add?" + params, body: task.to_json) } + client = HTTP::Client.new(@host, port: @port) + response = loop_till_connectable { client.post("/add?" + params, body: task.to_json) } + client.close() arrange_response(response) end def query_keys(service_key_with_wild_char : String) params = HTTP::Params.encode({"queue" => service_key_with_wild_char}) - response = loop_till_connectable { @client.get("/keys?" + params) } + client = HTTP::Client.new(@host, port: @port) + response = loop_till_connectable { client.get("/keys?" + params) } + client.close() arrange_response(response) end @@ -50,7 +53,9 @@ class TaskQueueAPI end private def response_put_api(cmd : String, params : String) - response = loop_till_connectable { @client.put("/#{cmd}?" + params) } + client = HTTP::Client.new(@host, port: @port) + response = loop_till_connectable { client.put("/#{cmd}?" + params) } + client.close() arrange_response(response) end -- 2.23.0
1 0
0 0
[PATCH lkp-tests] sbin/monitor: fix JSON.parse error
by Wu Zhende 03 Nov '20

03 Nov '20
[Why] query's value has three types. Can be "xxx", nil, "[xxx]". Only "[xxx]" can do JSON.parse. [Error1] Traceback (most recent call last): 6: from /c/lkp-tests/sbin/monitor:73:in `<main>' 5: from /home/code/lkp-tests/lib/monitor.rb:103:in `run' 4: from /home/code/lkp-tests/lib/monitor.rb:103:in `each' 3: from /home/code/lkp-tests/lib/monitor.rb:104:in `block in run' 2: from /usr/share/ruby/json/common.rb:156:in `parse' 1: from /usr/share/ruby/json/common.rb:156:in `new' /usr/share/ruby/json/common.rb:156:in `initialize': no implicit conversion of nil into String (TypeError) [Error2] Traceback (most recent call last): 6: from /c/lkp-tests/sbin/monitor:73:in `<main>' 5: from /home/code/lkp-tests/lib/monitor.rb:103:in `run' 4: from /home/code/lkp-tests/lib/monitor.rb:103:in `each' 3: from /home/code/lkp-tests/lib/monitor.rb:104:in `block in run' 2: from /usr/share/ruby/json/common.rb:156:in `parse' 1: from /usr/share/ruby/json/common.rb:156:in `new' /usr/share/ruby/json/common.rb:156:in `initialize': no implicit conversion of nil into String (TypeError) Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- lib/monitor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/monitor.rb b/lib/monitor.rb index e0098390..56283e10 100755 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -102,6 +102,7 @@ class Monitor @query.each do |k, v| @query[k] = JSON.parse(v) + rescue end query = @query.to_json puts "query=>#{query}" -- 2.23.0
1 0
0 0
[PATCH v2 lkp-tests 2/3] jobs/iozone-bs.yaml: combine iozone's multiple -i parameter to single
by Lu Kaiyi 03 Nov '20

03 Nov '20
[why] avoid explosion of parameter for iozone-bs.yaml Signed-off-by: Lu Kaiyi <2392863668(a)qq.com> --- jobs/iozone-bs.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jobs/iozone-bs.yaml b/jobs/iozone-bs.yaml index e2cd9f48..f9ab305f 100644 --- a/jobs/iozone-bs.yaml +++ b/jobs/iozone-bs.yaml @@ -2,9 +2,7 @@ suite: iozone category: benchmark file_size: 4g -write_rewrite: true -read_reread: true -random_read_write: true +test: write_rewrite,read_reread,random_read_write block_size: - 64k -- 2.23.0
2 3
0 0
[PATCH v7 compass-ci 2/2] kernel_version.md: explain key "kernel_version"
by Xu Xijian 03 Nov '20

03 Nov '20
[why] Explain the meaning of new key "kernel_version" for scheduler, including what's the mapping between its typical values and actual files in the disk and how to set it. Signed-off-by: Xu Xijian <hdxuxijian(a)163.com> --- doc/job/kernel_version.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/job/kernel_version.md diff --git a/doc/job/kernel_version.md b/doc/job/kernel_version.md new file mode 100644 index 0000000..d76a3bd --- /dev/null +++ b/doc/job/kernel_version.md @@ -0,0 +1,18 @@ +# kernel_version + +Meaning: +- Every os has its kernel, however an os can start with different kernels according to different need. +- kernel_version is a key for users to specify a kernel version. +- If kernel_version is not given by users, it will use the default one. + +Related files: +- In initramfs boot process, every kernel version is related with a vmlinuz, module and headers. +- Files like below under $boot_dir, an example $boot_dir can be "/srv/os/openeuler/aarch64/20.03/boot". +├── headers-4.19.90-2003.cgz +├── headers.cgz -> headers-4.19.90-2003.cgz +├── modules-4.19.90-2003.cgz +├── modules.cgz -> modules-4.19.90-2003.cgz +├── vmlinuz-4.19.90-2003 + +Usage example: +- submit iperf.yaml testbox=vm-hi1620-2p8g--$USER os=openeuler os_arch=aarch64 os_version=20.03 runtime=20 kernel_version=4.19.90-2003 -- 2.23.0
2 3
0 0
[PATCH compass-ci] specifies the queue from which the VM obtains tasks
by Xiao Shenwei 03 Nov '20

03 Nov '20
[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(a)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" $CCI_SRC/providers/qemu.sh diff --git a/providers/qemu.sh b/providers/qemu.sh index d97fd85..7e4f074 100755 --- a/providers/qemu.sh +++ b/providers/qemu.sh @@ -9,6 +9,7 @@ load_cci_defaults : ${hostname:="vm-1p1g-1"} +: ${queues:="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,14 +18,23 @@ echo $mac > mac echo "arp -n | grep ${mac//-/:}" > ip.sh chmod +x ip.sh -curl -X PUT "http://${SCHED_HOST:-172.17.0.1}:${SCHED_PORT:-3000}/set_host_mac?hostname=${hostname}&mac=${mac}" +set_host_info() +{ + # use "," replace " " + queues=$(echo $queues | sed -r 's/ +/,/g') + curl -X PUT "http://${SCHED_HOST:-172.17.0.1}:${SCHED_PORT:-3000}/set_host_mac?hostname=${hostname}&mac=${mac}" + curl -X PUT "http://${SCHED_HOST:-172.17.0.1}:${SCHED_PORT:-3000}/set_host2queues?host=${hostname}&queues=${queues}" + +} +set_host_info -del_host_mac() +del_host_info() { curl -X PUT "http://${SCHED_HOST:-172.17.0.1}:${SCHED_PORT:-3000}/del_host_mac?mac=${mac}" > /dev/null 2>&1 + curl -X PUT "http://${SCHED_HOST:-172.17.0.1}:${SCHED_PORT:-3000}/del_host2queues?host=${hostname}" > /dev/null 2>&1 } -trap del_host_mac EXIT +trap del_host_info EXIT ( if [[ $hostname =~ ^(.*)-[0-9]+$ ]]; then @@ -33,7 +43,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
3 4
0 0
[PATCH v5 compass-ci] LICENSES: add THIRD PARTY OPEN SOURCE SOFTWARE NOTICE
by Lu Kaiyi 03 Nov '20

03 Nov '20
add THIRD PARTY OPEN SOURCE SOFTWARE NOTICE for references. the directory structure of LICENSES as below: tree . ├── CCBY-4.0 ├── coreutils │   ├── coreutils │   ├── files │   └── GPL-3.0 -> ../GPL-3.0 ├── docker-sshd │   ├── docker-sshd │   ├── files │   └── MIT -> ../MIT ├── dracut │   ├── dracut │   ├── files │   └── GPL-2.0 -> ../GPL-2.0 ├── GPL-2.0 ├── GPL-3.0 ├── kemal │   ├── files │   ├── kemal │   └── MIT -> ../MIT ├── lkp-tests │   ├── files │   ├── GPL-2.0 -> ../GPL-2.0 │   └── lkp-tests ├── MIT ├── mritd.github.io │   ├── files │   ├── MIT -> ../MIT │   └── mritd.github.io ├── MulanPSL-2.0 └── Scout ├── files    ├── Scout    └── MIT -> ../MIT Signed-off-by: Lu Kaiyi <2392863668(a)qq.com> --- LICENSES/Scout/MIT | 1 + LICENSES/Scout/Scout | 17 +++++++++++++++++ LICENSES/Scout/files | 1 + LICENSES/coreutils/GPL-3.0 | 1 + LICENSES/coreutils/coreutils | 17 +++++++++++++++++ LICENSES/coreutils/files | 1 + LICENSES/docker-sshd/MIT | 1 + LICENSES/docker-sshd/docker-sshd | 17 +++++++++++++++++ LICENSES/docker-sshd/files | 1 + LICENSES/dracut/GPL-2.0 | 1 + LICENSES/dracut/dracut | 18 ++++++++++++++++++ LICENSES/dracut/files | 1 + LICENSES/kemal/MIT | 1 + LICENSES/kemal/files | 1 + LICENSES/kemal/kemal | 17 +++++++++++++++++ LICENSES/lkp-tests/GPL-2.0 | 1 + LICENSES/lkp-tests/files | 8 ++++++++ LICENSES/lkp-tests/lkp-tests | 18 ++++++++++++++++++ LICENSES/mritd.github.io/MIT | 1 + LICENSES/mritd.github.io/files | 1 + LICENSES/mritd.github.io/mritd.github.io | 17 +++++++++++++++++ 21 files changed, 142 insertions(+) create mode 120000 LICENSES/Scout/MIT create mode 100644 LICENSES/Scout/Scout create mode 100644 LICENSES/Scout/files create mode 120000 LICENSES/coreutils/GPL-3.0 create mode 100644 LICENSES/coreutils/coreutils create mode 100644 LICENSES/coreutils/files create mode 120000 LICENSES/docker-sshd/MIT create mode 100644 LICENSES/docker-sshd/docker-sshd create mode 100644 LICENSES/docker-sshd/files create mode 120000 LICENSES/dracut/GPL-2.0 create mode 100644 LICENSES/dracut/dracut create mode 100644 LICENSES/dracut/files create mode 120000 LICENSES/kemal/MIT create mode 100644 LICENSES/kemal/files create mode 100644 LICENSES/kemal/kemal create mode 120000 LICENSES/lkp-tests/GPL-2.0 create mode 100644 LICENSES/lkp-tests/files create mode 100644 LICENSES/lkp-tests/lkp-tests create mode 120000 LICENSES/mritd.github.io/MIT create mode 100644 LICENSES/mritd.github.io/files create mode 100644 LICENSES/mritd.github.io/mritd.github.io diff --git a/LICENSES/Scout/MIT b/LICENSES/Scout/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/Scout/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/Scout/Scout b/LICENSES/Scout/Scout new file mode 100644 index 0000000..6844406 --- /dev/null +++ b/LICENSES/Scout/Scout @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: Scout db170ce4ff160c4a2c30483e9410df1773cf572c + +Copyright notice: Copyright(c) 2010 Menno van Slooten, http://mennovanslooten.nl/ +License: The MIT License +License-Text: please refer to file MIT diff --git a/LICENSES/Scout/files b/LICENSES/Scout/files new file mode 100644 index 0000000..0d1e2e9 --- /dev/null +++ b/LICENSES/Scout/files @@ -0,0 +1 @@ +lib/themes.rb diff --git a/LICENSES/coreutils/GPL-3.0 b/LICENSES/coreutils/GPL-3.0 new file mode 120000 index 0000000..481ee24 --- /dev/null +++ b/LICENSES/coreutils/GPL-3.0 @@ -0,0 +1 @@ +../GPL-3.0 \ No newline at end of file diff --git a/LICENSES/coreutils/coreutils b/LICENSES/coreutils/coreutils new file mode 100644 index 0000000..1250a6f --- /dev/null +++ b/LICENSES/coreutils/coreutils @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: coreutils 6.9.89 + +Copyright notice: Copyright(C) 2007 Free Software Foundation, Inc. <https://fsf.org/> +License: The GPL-3.0 License +License-Text: please refer to file GPL-3.0 diff --git a/LICENSES/coreutils/files b/LICENSES/coreutils/files new file mode 100644 index 0000000..2256719 --- /dev/null +++ b/LICENSES/coreutils/files @@ -0,0 +1 @@ +container/os-nfs/entrypoint.sh diff --git a/LICENSES/docker-sshd/MIT b/LICENSES/docker-sshd/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/docker-sshd/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/docker-sshd/docker-sshd b/LICENSES/docker-sshd/docker-sshd new file mode 100644 index 0000000..603f668 --- /dev/null +++ b/LICENSES/docker-sshd/docker-sshd @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: docker-sshd 729faee00bcf0eff5f80059cd92aa425505820f0 + +Copyright notice: Copyright(c) 2015-2020 Volt Grid Pty Ltd +License: The MIT License +License-Text: please refer to file MIT diff --git a/LICENSES/docker-sshd/files b/LICENSES/docker-sshd/files new file mode 100644 index 0000000..3289565 --- /dev/null +++ b/LICENSES/docker-sshd/files @@ -0,0 +1 @@ +container/ssh-r/entry.sh diff --git a/LICENSES/dracut/GPL-2.0 b/LICENSES/dracut/GPL-2.0 new file mode 120000 index 0000000..9824569 --- /dev/null +++ b/LICENSES/dracut/GPL-2.0 @@ -0,0 +1 @@ +../GPL-2.0 \ No newline at end of file diff --git a/LICENSES/dracut/dracut b/LICENSES/dracut/dracut new file mode 100644 index 0000000..f09df60 --- /dev/null +++ b/LICENSES/dracut/dracut @@ -0,0 +1,18 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: dracut RHEL-7.1 + +Copyright notice: Copyright(C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, +Fifth Floor, Boston, MA 02110-1301 USA. +License: The GPL-2.0 License +License-Text: please refer to file GPL-2.0 diff --git a/LICENSES/dracut/files b/LICENSES/dracut/files new file mode 100644 index 0000000..d629bf6 --- /dev/null +++ b/LICENSES/dracut/files @@ -0,0 +1 @@ +container/dracut-initrd/bin/cifs-lib.sh diff --git a/LICENSES/kemal/MIT b/LICENSES/kemal/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/kemal/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/kemal/files b/LICENSES/kemal/files new file mode 100644 index 0000000..de6eda6 --- /dev/null +++ b/LICENSES/kemal/files @@ -0,0 +1 @@ +src/spec/scheduler/boot_spec.cr diff --git a/LICENSES/kemal/kemal b/LICENSES/kemal/kemal new file mode 100644 index 0000000..e08255f --- /dev/null +++ b/LICENSES/kemal/kemal @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: kemal 0.17.0 + +Copyright notice: Copyright(c) 2016 Serdar Doğruyol +License: The MIT License +License-Text: please refer to file MIT diff --git a/LICENSES/lkp-tests/GPL-2.0 b/LICENSES/lkp-tests/GPL-2.0 new file mode 120000 index 0000000..9824569 --- /dev/null +++ b/LICENSES/lkp-tests/GPL-2.0 @@ -0,0 +1 @@ +../GPL-2.0 \ No newline at end of file diff --git a/LICENSES/lkp-tests/files b/LICENSES/lkp-tests/files new file mode 100644 index 0000000..df39f15 --- /dev/null +++ b/LICENSES/lkp-tests/files @@ -0,0 +1,8 @@ +sbin/compare +providers/multi-docker +container/open-scheduler/build-depends +user-client/jobs/iperf-pxe.yaml +user-client/jobs/iperf-vm.yaml +src/features/jobs/right_iperf.yaml +lib/matrix2.rb +sbin/es-find diff --git a/LICENSES/lkp-tests/lkp-tests b/LICENSES/lkp-tests/lkp-tests new file mode 100644 index 0000000..3f40d5f --- /dev/null +++ b/LICENSES/lkp-tests/lkp-tests @@ -0,0 +1,18 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: lkp-tests fcb47ccfc50c1f4da388aed9596c0acaac04a917 + +Copyright notice: Copyright(C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, +Fifth Floor, Boston, MA 02110-1301 USA +License: The GPL-2.0 License +License-Text: please refer to file GPL-2.0 diff --git a/LICENSES/mritd.github.io/MIT b/LICENSES/mritd.github.io/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/mritd.github.io/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/mritd.github.io/files b/LICENSES/mritd.github.io/files new file mode 100644 index 0000000..eeaa82a --- /dev/null +++ b/LICENSES/mritd.github.io/files @@ -0,0 +1 @@ +container/registry/config.yml diff --git a/LICENSES/mritd.github.io/mritd.github.io b/LICENSES/mritd.github.io/mritd.github.io new file mode 100644 index 0000000..ee22568 --- /dev/null +++ b/LICENSES/mritd.github.io/mritd.github.io @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: mritd.github.io ed4350e91e9b76078a850ede8302854d3393f493 + +Copyright notice: Copyright(c) 2013-2016 Blackrock Digital LLC. +License: The MIT License +License-Text: please refer to file MIT -- 2.23.0
1 0
0 0
[PATCH v8 compass-ci 1/2] kernel_version.md: explain key "kernel_version"
by Xu Xijian 03 Nov '20

03 Nov '20
[why] Explain the meaning of new key "kernel_version" for scheduler, including what's the mapping between its typical values and actual files in the disk and how to set it. Signed-off-by: Xu Xijian <hdxuxijian(a)163.com> --- doc/job/kernel_version.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/job/kernel_version.md diff --git a/doc/job/kernel_version.md b/doc/job/kernel_version.md new file mode 100644 index 0000000..d76a3bd --- /dev/null +++ b/doc/job/kernel_version.md @@ -0,0 +1,18 @@ +# kernel_version + +Meaning: +- Every os has its kernel, however an os can start with different kernels according to different need. +- kernel_version is a key for users to specify a kernel version. +- If kernel_version is not given by users, it will use the default one. + +Related files: +- In initramfs boot process, every kernel version is related with a vmlinuz, module and headers. +- Files like below under $boot_dir, an example $boot_dir can be "/srv/os/openeuler/aarch64/20.03/boot". +├── headers-4.19.90-2003.cgz +├── headers.cgz -> headers-4.19.90-2003.cgz +├── modules-4.19.90-2003.cgz +├── modules.cgz -> modules-4.19.90-2003.cgz +├── vmlinuz-4.19.90-2003 + +Usage example: +- submit iperf.yaml testbox=vm-hi1620-2p8g--$USER os=openeuler os_arch=aarch64 os_version=20.03 runtime=20 kernel_version=4.19.90-2003 -- 2.23.0
2 2
0 0
[PATCH v4 compass-ci] LICENSES: add THIRD PARTY OPEN SOURCE SOFTWARE NOTICE
by Lu Kaiyi 03 Nov '20

03 Nov '20
add THIRD PARTY OPEN SOURCE SOFTWARE NOTICE for references. the directory structure of LICENSES as below: tree . ├── CCBY-4.0 ├── coreutils │   ├── coreutils │   ├── files │   └── GPL-3.0 -> ../GPL-3.0 ├── docker-sshd │   ├── docker-sshd │   ├── files │   └── MIT -> ../MIT ├── dracut │   ├── dracut │   ├── files │   └── GPL-2.0 -> ../GPL-2.0 ├── GPL-2.0 ├── GPL-3.0 ├── kemal │   ├── files │   ├── kemal │   └── MIT -> ../MIT ├── lkp-tests │   ├── files │   ├── GPL-2.0 -> ../GPL-2.0 │   └── lkp-tests ├── MIT ├── mritd.github.io │   ├── files │   ├── MIT -> ../MIT │   └── mritd.github.io ├── MulanPSL-2.0 └── Scout ├── files    ├── Scout    └── MIT -> ../MIT Signed-off-by: Lu Kaiyi <2392863668(a)qq.com> --- LICENSES/Scout/MIT | 1 + LICENSES/Scout/Scout | 17 +++++++++++++++++ LICENSES/Scout/files | 1 + LICENSES/coreutils/GPL-3.0 | 1 + LICENSES/coreutils/coreutils | 17 +++++++++++++++++ LICENSES/coreutils/files | 1 + LICENSES/docker-sshd/MIT | 1 + LICENSES/docker-sshd/docker-sshd | 17 +++++++++++++++++ LICENSES/docker-sshd/files | 1 + LICENSES/dracut/GPL-2.0 | 1 + LICENSES/dracut/dracut | 18 ++++++++++++++++++ LICENSES/dracut/files | 1 + LICENSES/kemal/MIT | 1 + LICENSES/kemal/files | 1 + LICENSES/kemal/kemal | 17 +++++++++++++++++ LICENSES/lkp-tests/GPL-2.0 | 1 + LICENSES/lkp-tests/files | 8 ++++++++ LICENSES/lkp-tests/lkp-tests | 18 ++++++++++++++++++ LICENSES/mritd.github.io/MIT | 1 + LICENSES/mritd.github.io/files | 1 + LICENSES/mritd.github.io/mritd.github.io | 17 +++++++++++++++++ 21 files changed, 142 insertions(+) create mode 120000 LICENSES/Scout/MIT create mode 100644 LICENSES/Scout/Scout create mode 100644 LICENSES/Scout/files create mode 120000 LICENSES/coreutils/GPL-3.0 create mode 100644 LICENSES/coreutils/coreutils create mode 100644 LICENSES/coreutils/files create mode 120000 LICENSES/docker-sshd/MIT create mode 100644 LICENSES/docker-sshd/docker-sshd create mode 100644 LICENSES/docker-sshd/files create mode 120000 LICENSES/dracut/GPL-2.0 create mode 100644 LICENSES/dracut/dracut create mode 100644 LICENSES/dracut/files create mode 120000 LICENSES/kemal/MIT create mode 100644 LICENSES/kemal/files create mode 100644 LICENSES/kemal/kemal create mode 120000 LICENSES/lkp-tests/GPL-2.0 create mode 100644 LICENSES/lkp-tests/files create mode 100644 LICENSES/lkp-tests/lkp-tests create mode 120000 LICENSES/mritd.github.io/MIT create mode 100644 LICENSES/mritd.github.io/files create mode 100644 LICENSES/mritd.github.io/mritd.github.io diff --git a/LICENSES/Scout/MIT b/LICENSES/Scout/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/Scout/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/Scout/Scout b/LICENSES/Scout/Scout new file mode 100644 index 0000000..6844406 --- /dev/null +++ b/LICENSES/Scout/Scout @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: Scout db170ce4ff160c4a2c30483e9410df1773cf572c + +Copyright notice: Copyright(c) 2010 Menno van Slooten, http://mennovanslooten.nl/ +License: The MIT License +License-Text: please refer to file MIT diff --git a/LICENSES/Scout/files b/LICENSES/Scout/files new file mode 100644 index 0000000..e120df8 --- /dev/null +++ b/LICENSES/Scout/files @@ -0,0 +1 @@ +/compass-ci/lib/themes.rb diff --git a/LICENSES/coreutils/GPL-3.0 b/LICENSES/coreutils/GPL-3.0 new file mode 120000 index 0000000..481ee24 --- /dev/null +++ b/LICENSES/coreutils/GPL-3.0 @@ -0,0 +1 @@ +../GPL-3.0 \ No newline at end of file diff --git a/LICENSES/coreutils/coreutils b/LICENSES/coreutils/coreutils new file mode 100644 index 0000000..1250a6f --- /dev/null +++ b/LICENSES/coreutils/coreutils @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: coreutils 6.9.89 + +Copyright notice: Copyright(C) 2007 Free Software Foundation, Inc. <https://fsf.org/> +License: The GPL-3.0 License +License-Text: please refer to file GPL-3.0 diff --git a/LICENSES/coreutils/files b/LICENSES/coreutils/files new file mode 100644 index 0000000..8a2b690 --- /dev/null +++ b/LICENSES/coreutils/files @@ -0,0 +1 @@ +/compass-ci/container/os-nfs/entrypoint.sh diff --git a/LICENSES/docker-sshd/MIT b/LICENSES/docker-sshd/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/docker-sshd/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/docker-sshd/docker-sshd b/LICENSES/docker-sshd/docker-sshd new file mode 100644 index 0000000..603f668 --- /dev/null +++ b/LICENSES/docker-sshd/docker-sshd @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: docker-sshd 729faee00bcf0eff5f80059cd92aa425505820f0 + +Copyright notice: Copyright(c) 2015-2020 Volt Grid Pty Ltd +License: The MIT License +License-Text: please refer to file MIT diff --git a/LICENSES/docker-sshd/files b/LICENSES/docker-sshd/files new file mode 100644 index 0000000..018684c --- /dev/null +++ b/LICENSES/docker-sshd/files @@ -0,0 +1 @@ +/compass-ci/container/ssh-r/entry.sh diff --git a/LICENSES/dracut/GPL-2.0 b/LICENSES/dracut/GPL-2.0 new file mode 120000 index 0000000..9824569 --- /dev/null +++ b/LICENSES/dracut/GPL-2.0 @@ -0,0 +1 @@ +../GPL-2.0 \ No newline at end of file diff --git a/LICENSES/dracut/dracut b/LICENSES/dracut/dracut new file mode 100644 index 0000000..f09df60 --- /dev/null +++ b/LICENSES/dracut/dracut @@ -0,0 +1,18 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: dracut RHEL-7.1 + +Copyright notice: Copyright(C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, +Fifth Floor, Boston, MA 02110-1301 USA. +License: The GPL-2.0 License +License-Text: please refer to file GPL-2.0 diff --git a/LICENSES/dracut/files b/LICENSES/dracut/files new file mode 100644 index 0000000..78235de --- /dev/null +++ b/LICENSES/dracut/files @@ -0,0 +1 @@ +/compass-ci/container/dracut-initrd/bin/cifs-lib.sh diff --git a/LICENSES/kemal/MIT b/LICENSES/kemal/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/kemal/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/kemal/files b/LICENSES/kemal/files new file mode 100644 index 0000000..71a8cab --- /dev/null +++ b/LICENSES/kemal/files @@ -0,0 +1 @@ +/compass-ci/src/spec/scheduler/boot_spec.cr diff --git a/LICENSES/kemal/kemal b/LICENSES/kemal/kemal new file mode 100644 index 0000000..e08255f --- /dev/null +++ b/LICENSES/kemal/kemal @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: kemal 0.17.0 + +Copyright notice: Copyright(c) 2016 Serdar Doğruyol +License: The MIT License +License-Text: please refer to file MIT diff --git a/LICENSES/lkp-tests/GPL-2.0 b/LICENSES/lkp-tests/GPL-2.0 new file mode 120000 index 0000000..9824569 --- /dev/null +++ b/LICENSES/lkp-tests/GPL-2.0 @@ -0,0 +1 @@ +../GPL-2.0 \ No newline at end of file diff --git a/LICENSES/lkp-tests/files b/LICENSES/lkp-tests/files new file mode 100644 index 0000000..fde5c05 --- /dev/null +++ b/LICENSES/lkp-tests/files @@ -0,0 +1,8 @@ +/compass-ci/sbin/compare +/compass-ci/providers/multi-docker +/compass-ci/container/open-scheduler/build-depends +/compass-ci/user-client/jobs/iperf-pxe.yaml +/compass-ci/user-client/jobs/iperf-vm.yaml +/compass-ci/src/features/jobs/right_iperf.yaml +/compass-ci/lib/matrix2.rb +/compass-ci/sbin/es-find diff --git a/LICENSES/lkp-tests/lkp-tests b/LICENSES/lkp-tests/lkp-tests new file mode 100644 index 0000000..3f40d5f --- /dev/null +++ b/LICENSES/lkp-tests/lkp-tests @@ -0,0 +1,18 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: lkp-tests fcb47ccfc50c1f4da388aed9596c0acaac04a917 + +Copyright notice: Copyright(C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, +Fifth Floor, Boston, MA 02110-1301 USA +License: The GPL-2.0 License +License-Text: please refer to file GPL-2.0 diff --git a/LICENSES/mritd.github.io/MIT b/LICENSES/mritd.github.io/MIT new file mode 120000 index 0000000..91e6d98 --- /dev/null +++ b/LICENSES/mritd.github.io/MIT @@ -0,0 +1 @@ +../MIT \ No newline at end of file diff --git a/LICENSES/mritd.github.io/files b/LICENSES/mritd.github.io/files new file mode 100644 index 0000000..38b67c1 --- /dev/null +++ b/LICENSES/mritd.github.io/files @@ -0,0 +1 @@ +/compass-ci/container/registry/config.yml diff --git a/LICENSES/mritd.github.io/mritd.github.io b/LICENSES/mritd.github.io/mritd.github.io new file mode 100644 index 0000000..ee22568 --- /dev/null +++ b/LICENSES/mritd.github.io/mritd.github.io @@ -0,0 +1,17 @@ +THIRD PARTY OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with +this software and/or this software component contributed by Huawei (in the following just "this SOFTWARE"). +The open source software licenses are granted by respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, +BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS +FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts +Software: mritd.github.io ed4350e91e9b76078a850ede8302854d3393f493 + +Copyright notice: Copyright(c) 2013-2016 Blackrock Digital LLC. +License: The MIT License +License-Text: please refer to file MIT -- 2.23.0
2 1
0 0
[PATCH v2 lkp-tests 3/3] tests/iozone: modify the way of parsing parameter
by Lu Kaiyi 03 Nov '20

03 Nov '20
[why] iozone-bs.yaml has combined multiple parameter to single, so, iozone tool need change the way of parsing parameter. [how] modify the way of parsing parameter. Signed-off-by: Lu Kaiyi <2392863668(a)qq.com> --- tests/iozone | 50 ++++++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/tests/iozone b/tests/iozone index 88a92a18..19c246f1 100755 --- a/tests/iozone +++ b/tests/iozone @@ -1,42 +1,36 @@ #!/bin/sh # - block_size # - file_size -# - write_rewrite -# - read_reread -# - random_read_write -# - read_backwards -# - rewrite_record -# - stride_read -# - fwrite_refwrite -# - fread_refread -# - random_mix -# - pwrite_repwrite -# - pread_repread -# - pwritev_repwritev -# - preadv_repreadv +# - test ## IOzone is a filesystem benchmark tool. The benchmark generates ## and measures a variety of file operations. . $LKP_SRC/lib/reproduce-log.sh - args="iozone" if [ -n "$block_size" ]; then args+=" -r $block_size" - [ -n "$file_size" ] && args+=" -s $file_size" - [ -n "$write_rewrite" ] && args+=" -i 0" - [ -n "$read_reread" ] && args+=" -i 1" - [ -n "$random_read_write" ] && args+=" -i 2" - [ -n "$read_backwards" ] && args+=" -i 3" - [ -n "$rewrite_record" ] && args+=" -i 4" - [ -n "$stride_read" ] && args+=" -i 5" - [ -n "$fwrite_refwrite" ] && args+=" -i 6" - [ -n "$fread_refread" ] && args+=" -i 7" - [ -n "$random_mix" ] && args+=" -i 8" - [ -n "$pwrite_repwrite" ] && args+=" -i 9" - [ -n "$pread_repread" ] && args+=" -i 10" - [ -n "$pwritev_repwritev" ] && args+=" -i 11" - [ -n "$preadv_repreadv" ] && args+=" -i 12" + [ -n "$file_size" ] && args+=" -s $file_size" + OLD_IFS="$IFS" + IFS="," + array=($test) + IFS="$OLD_IFS" + for ele in ${array[@]} + do + [ "$ele" == "write_rewrite" ] && args+=" -i 0" + [ "$ele" == "read_reread" ] && args+=" -i 1" + [ "$ele" == "random_read_write" ] && args+=" -i 2" + [ "$ele" == "read_backwards" ] && args+=" -i 3" + [ "$ele" == "rewrite_record" ] && args+=" -i 4" + [ "$ele" == "stride_read" ] && args+=" -i 5" + [ "$ele" == "fwrite_refwrite" ] && args+=" -i 6" + [ "$ele" == "fread_refread" ] && args+=" -i 7" + [ "$ele" == "random_mix" ] && args+=" -i 8" + [ "$ele" == "pwrite_repwrite" ] && args+=" -i 9" + [ "$ele" == "pread_repread" ] && args+=" -i 10" + [ "$ele" == "pwritev_repwritev" ] && args+=" -i 11" + [ "$ele" == "preadv_repreadv" ] && args+=" -i 12" + done else args+=" -a" fi -- 2.23.0
2 1
0 0
[PATCH v2 lkp-tests 1/3] jobs/iozone-bs.yaml: fix mapper_parsing_exception
by Lu Kaiyi 03 Nov '20

03 Nov '20
[why] when key and value of fs: xfs in same line for iozone-bs.yaml, submit job will cause some error occurred like below: submit /home/lukaiyi/lkp-tests/jobs/iozone-bs.yaml failed, got job_id=z9.144590, error: [{"type" => "mapper_parsing_exception", "reason" => "failed to parse [pp.fs.fs]"}] [how] change key and value of fs: xfs to different line, same to iosched: kyber Signed-off-by: Lu Kaiyi <2392863668(a)qq.com> --- jobs/iozone-bs.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jobs/iozone-bs.yaml b/jobs/iozone-bs.yaml index 868979fc..e2cd9f48 100644 --- a/jobs/iozone-bs.yaml +++ b/jobs/iozone-bs.yaml @@ -14,6 +14,11 @@ block_size: - 16m disk: 1HDD -fs: xfs -iosched: kyber + +fs: +- xfs + +iosched: +- kyber + iozone: -- 2.23.0
2 1
0 0
[PATCH v8 compass-ci 2/2] job.cr: add a key "kernel_version" for initramfs
by Xu Xijian 03 Nov '20

03 Nov '20
When run job with initramfs, there is a default combination of kernel, modules and headers, and I add a key "kernel_version" to make it optional. Signed-off-by: Xu Xijian <hdxuxijian(a)163.com> --- src/lib/job.cr | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 1e49da6..6309809 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -87,6 +87,10 @@ class Job kernel_append_root kernel_params docker_image + kernel_version + linux_vmlinuz_path + linux_modules_initrd + linux_headers_initrd ) macro method_missing(call) @@ -135,6 +139,7 @@ class Job set_result_service() set_os_mount() set_depends_initrd() + set_kernel_version() set_initrds_uri() set_kernel_uri() set_kernel_append_root() @@ -293,9 +298,17 @@ class Job return true end + private def set_kernel_version + boot_dir = "#{SRV_OS}/#{os_dir}/boot" + suffix = "-#{kernel_version}" if self["kernel_version"]? + self["linux_vmlinuz_path"] = File.real_path("#{boot_dir}/vmlinuz#{suffix}") + self["linux_modules_initrd"] = File.real_path("#{boot_dir}/modules#{suffix}.cgz") + self["linux_headers_initrd"] = File.real_path("#{boot_dir}/headers#{suffix}.cgz") + end + private def set_kernel_uri self["kernel_uri"] = "kernel #{OS_HTTP_PREFIX}" + - "#{JobHelper.service_path("#{SRV_OS}/#{os_dir}/vmlinuz")}" + "#{JobHelper.service_path("#{linux_vmlinuz_path}")}" end private def common_initrds @@ -316,6 +329,10 @@ class Job "#{JobHelper.service_path("#{osimage_dir}/current")}" temp_initrds << "#{INITRD_HTTP_PREFIX}" + "#{JobHelper.service_path("#{osimage_dir}/run-ipconfig.cgz")}" + temp_initrds << "#{OS_HTTP_PREFIX}" + + "#{JobHelper.service_path("#{linux_modules_initrd}")}" + temp_initrds << "#{OS_HTTP_PREFIX}" + + "#{JobHelper.service_path("#{linux_headers_initrd}")}" temp_initrds.concat(initrd_deps.split(/ /)) unless initrd_deps.empty? temp_initrds.concat(initrd_pkg.split(/ /)) unless initrd_pkg.empty? -- 2.23.0
1 0
0 0
[PATCH v7 compass-ci 1/2] job.cr: add a key "kernel_version" for initramfs
by Xu Xijian 03 Nov '20

03 Nov '20
When run job with initramfs, there is a default combination of kernel, modules and headers, and I add a key "kernel_version" to make it optional. Signed-off-by: Xu Xijian <hdxuxijian(a)163.com> --- src/lib/job.cr | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 0fd57e0..2fa1125 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -87,6 +87,10 @@ class Job kernel_append_root kernel_params docker_image + kernel_version + vmlinuz_path + modules_path + headers_path ) macro method_missing(call) @@ -135,6 +139,7 @@ class Job set_result_service() set_os_mount() set_depends_initrd() + set_kernel_version() set_initrds_uri() set_kernel_uri() set_kernel_append_root() @@ -293,9 +298,17 @@ class Job return true end + private def set_kernel_version + boot_dir = "#{SRV_OS}/#{os_dir}/boot" + suffix = "-#{kernel_version}" if self["kernel_version"]? + self["vmlinuz_path"] = File.real_path("#{boot_dir}/vmlinuz#{suffix}") + self["modules_path"] = File.real_path("#{boot_dir}/modules#{suffix}.cgz") + self["headers_path"] = File.real_path("#{boot_dir}/headers#{suffix}.cgz") + end + private def set_kernel_uri self["kernel_uri"] = "kernel #{OS_HTTP_PREFIX}" + - "#{JobHelper.service_path("#{SRV_OS}/#{os_dir}/vmlinuz")}" + "#{JobHelper.service_path("#{vmlinuz_path}")}" end private def common_initrds @@ -316,6 +329,10 @@ class Job "#{JobHelper.service_path("#{osimage_dir}/current")}" temp_initrds << "#{INITRD_HTTP_PREFIX}" + "#{JobHelper.service_path("#{osimage_dir}/run-ipconfig.cgz")}" + temp_initrds << "#{OS_HTTP_PREFIX}" + + "#{JobHelper.service_path("#{modules_path}")}" + temp_initrds << "#{OS_HTTP_PREFIX}" + + "#{JobHelper.service_path("#{headers_path}")}" temp_initrds.concat(initrd_deps.split(/ /)) unless initrd_deps.empty? temp_initrds.concat(initrd_pkg.split(/ /)) unless initrd_pkg.empty? -- 2.23.0
3 4
0 0
[PATCH v2 compass-ci 3/3] container/assign-account: answerback-email.rb
by Luan Shengde 03 Nov '20

03 Nov '20
1. disable use golbal variable apply_info [why] Style/GlobalVars: Do not introduce global variables. [how] use local variables instead of global variables 2. enable transfer user info when execute apply account command [why] when applying account, the assign-account service will write the my info to user's default config file ~/.config/compass-ci/defaults/account.yaml my info: - my_email - my_name - my_uuid [how] transfer the user info along with the pub_key to assign-account service Signed-off-by: Luan Shengde <luanshengde2(a)huawei.com> --- container/assign-account/answerback-email.rb | 62 ++++++++++++-------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/container/assign-account/answerback-email.rb b/container/assign-account/answerback-email.rb index bb8e809..c174302 100755 --- a/container/assign-account/answerback-email.rb +++ b/container/assign-account/answerback-email.rb @@ -12,6 +12,7 @@ require 'mail' require 'set' require 'optparse' require_relative '../defconfig' +require_relative '../../lib/es_client' names = Set.new %w[ JUMPER_HOST @@ -24,23 +25,25 @@ defaults = relevant_defaults(names) JUMPER_HOST = defaults['JUMPER_HOST'] || 'api.compass-ci.openeuler.org' JUMPER_PORT = defaults['JUMPER_PORT'] || 29999 -SEND_MAIL_HOST = defaults['SEND_MAIL_HOST_INTERNET'] || 'localhost' -SEND_MAIL_PORT = defaults['SEND_MAIL_PORT_INTERNET'] || 11312 +SEND_MAIL_HOST = defaults['SEND_MAIL_HOST'] || 'localhost' +SEND_MAIL_PORT = defaults['SEND_MAIL_PORT'] || 49000 -$apply_info = { +apply_info = { 'my_email' => nil, + 'my_name' => nil, + 'my_uuid' => %x(uuidgen).chomp, 'my_ssh_pubkey' => nil } -def init_info(email_file) +def init_info(email_file, apply_info) mail_content = Mail.read(email_file) + apply_info['my_email'] = mail_content.from[0] + apply_info['my_name'] = mail_content.From.unparsed_value.gsub(/ <[^<>]*>/, '') + apply_info['my_ssh_pubkey'] = if mail_content.part[1].filename == 'id_rsa.pub' + mail_content.part[1].body.decoded + end - $apply_info['my_email'] = mail_content.from[0] - $apply_info['my_ssh_pubkey'] = if mail_content.part[1].filename == 'id_rsa.pub' - mail_content.part[1].body.decoded.gsub(/\r|\n/, '') - end - - $apply_info + apply_info end options = OptionParser.new do |opts| @@ -52,15 +55,17 @@ options = OptionParser.new do |opts| opts.separator 'options:' opts.on('-e|--email email_address', 'appoint email address') do |email_address| - $apply_info['my_email'] = email_address + apply_info['my_email'] = email_address + # when apply account with email address, will get no user name + apply_info['my_name'] = '' end opts.on('-s|--ssh-pubkey pub_key_file', 'ssh pub_key file, enable password-less login') do |pub_key_file| - $apply_info['my_ssh_pubkey'] = File.read(pub_key_file) + apply_info['my_ssh_pubkey'] = File.read(pub_key_file) end opts.on('-f|--raw-email email_file', 'email file') do |email_file| - init_info(email_file) + init_info(email_file, apply_info) end opts.on_tail('-h|--help', 'show this message') do @@ -94,26 +99,35 @@ def build_message(email, acct_infos) return message end -def account_info(pub_key) - account_info_str = if pub_key.nil? - %x(curl -XGET '#{JUMPER_HOST}:#{JUMPER_PORT}/assign_account') - else - %x(curl -XGET '#{JUMPER_HOST}:#{JUMPER_PORT}/assign_account' -d "pub_key: #{pub_key}") - end +def account_info(user_info) + account_info_str = %x(curl -XGET '#{JUMPER_HOST}:#{JUMPER_PORT}/assign_account' -d '#{user_info.to_json}') JSON.parse account_info_str end -def send_account +def send_account(apply_info) message = "No email address specified\n" message += "use -e email_address add a email address\n" message += 'or use -f to add a email file' - raise message if $apply_info['my_email'].nil? + raise message if apply_info['my_email'].nil? - acct_info = account_info($apply_info['my_ssh_pubkey']) + acct_info = account_info(apply_info) + my_info = { + 'my_email' => apply_info['my_email'], + 'my_name' => apply_info['my_name'], + 'my_commit_url' => '', + 'my_login_name' => acct_info['account'], + 'my_uuid' => apply_info['my_uuid'] + } - message = build_message($apply_info['my_email'], acct_info) + store_account_info(my_info) + message = build_message(apply_info['my_email'], acct_info) %x(curl -XPOST '#{SEND_MAIL_HOST}:#{SEND_MAIL_PORT}/send_mail_text' -d "#{message}") end -send_account +def store_account_info(my_info) + es = ESClient.new(index: 'accounts') + es.put_source_by_id(my_info['my_email'], my_info) +end + +send_account(apply_info) -- 2.23.0
2 2
0 0
[PATCH v2 compass-ci 2/3] container/assign-account: get_account_info
by Luan Shengde 03 Nov '20

03 Nov '20
add new function to config default yaml file [why]: easier for user to config the default yaml file [how]: when get request data, parse the data and write the user infos to default yaml file: ~/.config/compass-ci/default/account.yaml include: - my_email - my_name - my_uuid Signed-off-by: Luan Shengde <luanshengde2(a)huawei.com> --- container/assign-account/get_account_info.rb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/container/assign-account/get_account_info.rb b/container/assign-account/get_account_info.rb index 2f93d5b..ae55dcb 100755 --- a/container/assign-account/get_account_info.rb +++ b/container/assign-account/get_account_info.rb @@ -44,6 +44,8 @@ the returned data for setup_jumper_account_info like: =end +require 'fileutils' + # get jumper and account info class AccountStorage ACCOUNT_DIR = '/opt/account_data/' @@ -93,7 +95,7 @@ class AccountStorage def setup_jumper_account_info account_info = read_account_info jumper_info = read_jumper_info - pub_key = @data['pub_key'] unless @data.nil? + pub_key = @data['my_ssh_pubkey'] unless @data['my_ssh_pubkey'].nil? jumper_ip = jumper_info[0].chomp jumper_port = jumper_info[1].chomp @@ -111,9 +113,23 @@ class AccountStorage } setup_authorized_key(account, pub_key) + setup_default_yaml(account) + return jumper_account_info end + def setup_default_yaml(account) + default_yaml_dir = File.join('/home', account, '.config/compass-ci/defaults') + FileUtils.mkdir_p default_yaml_dir + + File.open("#{default_yaml_dir}/#{account}.yaml", 'a') do |file| + file.puts "my_email: #{@data['my_email']}" + file.puts "my_name: #{@data['my_name']}" + file.puts "my_uuid: #{@data['my_uuid']}" + end + %x(chown -R #{account}:#{account} "/home/#{account}/.config") + end + def setup_authorized_key(account, pub_key) ssh_dir = File.join('/home/', account, '.ssh') Dir.mkdir ssh_dir, 0o700 -- 2.23.0
2 2
0 0
[PATCH v3 compass-ci] lib/job.cr: fix pp dir layout
by Wang Yong 03 Nov '20

03 Nov '20
[Why] due to cci-makepkg and cci-depends dir layout change, pp need update together Signed-off-by: Wang Yong <wangyong0117(a)qq.com> --- src/lib/job.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 0fd57e0..1e49da6 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -405,8 +405,8 @@ class Job program = $1 end - deps_dest_file = "#{SRV_INITRD}/deps/#{mount_type}/#{os_dir}/#{program}.cgz" - pkg_dest_file = "#{SRV_INITRD}/pkg/#{mount_type}/#{os_dir}/#{program}.cgz" + deps_dest_file = "#{SRV_INITRD}/deps/#{mount_type}/#{os_dir}/#{program}/#{program}.cgz" + pkg_dest_file = "#{SRV_INITRD}/pkg/#{mount_type}/#{os_dir}/#{program}/latest.cgz" if File.exists?(deps_dest_file) initrd_deps_arr << "#{initrd_http_prefix}" + JobHelper.service_path(deps_dest_file) -- 2.23.0
1 0
0 0
[PATCH v3 lkp-tests 2/2] tests/*: fix cci job dir layout
by Wang Yong 03 Nov '20

03 Nov '20
[Why] for multi version support, cgz file for cci-makepkg need change dir layout, and change cci-depends dir layout together to easily update scheduler code path: /srv/initrd/pkg/${os_mount}/${os}/${os_arch}/${os_version}/ => /srv/initrd/pkg/${os_mount}/${os}/${os_arch}/${os_version}/${pkgname}/ filename: cci-makepkg ${pkgver}-${pkgrel}.cgz latest.cgz -> ${pkgver}-${pkgrel}.cgz filename: cci-depends stay original ${benchmark}.cgz ${benchmark}.cgz -> ${benchmark}_${date}.cgz E.g. output: cci-depends stay original $ tree iperf ├── iperf_20201102.cgz └── iperf.cgz -> iperf_20201102.cgz output: cci-makepkg $ tree sar ├── git-1.cgz └── latest.cgz -> git-1.cgz Signed-off-by: Wang Yong <wangyong0117(a)qq.com> --- tests/cci-depends | 2 +- tests/cci-makepkg | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/cci-depends b/tests/cci-depends index 36923ea4d..efa9a025b 100755 --- a/tests/cci-depends +++ b/tests/cci-depends @@ -18,7 +18,7 @@ DEPS_MNT=/initrd/deps && mkdir -p "$DEPS_MNT" DISTRO=${os} [[ "$os_mount" = "cifs" ]] && os_mount="nfs" -pack_to=${DEPS_MNT}/${os_mount}/${os}/${os_arch}/${os_version} +pack_to=${DEPS_MNT}/${os_mount}/${os}/${os_arch}/${os_version}/${benchmark} pack_arch=$os_arch [[ "$benchmark" = "${benchmark##*.}" ]] || diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 9d5082629..9551ebfe2 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -26,7 +26,7 @@ mkdir -p "$PKG_MNT" export DISTRO=${os} [[ "$os_mount" = "cifs" ]] && os_mount="nfs" -pack_to=${os_mount}/${os}/${os_arch}/${os_version} +pack_to=${os_mount}/${os}/${os_arch}/${os_version}/${benchmark} . $LKP_SRC/distro/${DISTRO} . $LKP_SRC/lib/install.sh @@ -65,8 +65,8 @@ update_shared_pkg() [ "$bm_name" = "$benchmark" ] && return # benchmark is a symlink - ln -sf "$bm_link" "$sync_dest/${benchmark}.cgz" || return - echo "update shared pkg link ${benchmark}.cgz -> $bm_link" + ln -sf latest.cgz "$sync_dest/${benchmark}.cgz" || return + echo "update shared pkg link ${benchmark}.cgz -> ${bm_name}/${cgz_name}" } distro_install_depends lkp-dev @@ -86,7 +86,7 @@ date=$(date +"%Y%m%d") pkgver=$(get_pkg_info pkgver) pkgrel=$(get_pkg_info pkgrel) bm_name=$(check_shared_pkg) -cgz_name="${bm_name}-${pkgver:-0}-${pkgrel:-0}_${date}.cgz" +cgz_name="${pkgver:-0}-${pkgrel:-0}.cgz" setup_proxy @@ -98,8 +98,8 @@ update_softlink() { [ -e "$sync_dest/$cgz_name" ] || return - ln -sf "$(basename $(realpath $sync_dest/$cgz_name))" "$sync_dest/${bm_name}.cgz" || return - echo "create package: $sync_dest/${bm_name}.cgz -> $(realpath $sync_dest/$cgz_name)" + ln -sf "$(basename $(realpath $sync_dest/$cgz_name))" "$sync_dest/latest.cgz" || return + echo "create package: $sync_dest/latest.cgz -> $(realpath $sync_dest/$cgz_name)" update_shared_pkg "${bm_name}.cgz" -- 2.23.0
1 0
0 0
[PATCH v3 lkp-tests 1/2] fix(distro/depends): add depends file
by Wang Yong 03 Nov '20

03 Nov '20
[Why] there are pack-deps/makepkg depends file before and use nfs-common, now we use cci-depends/cci-makepkg file and use cifs-utils. Signed-off-by: Wang Yong <wangyong0117(a)qq.com> --- distro/depends/cci-depends | 2 ++ distro/depends/cci-makepkg | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 distro/depends/cci-depends create mode 100644 distro/depends/cci-makepkg diff --git a/distro/depends/cci-depends b/distro/depends/cci-depends new file mode 100644 index 000000000..1f7f73ac3 --- /dev/null +++ b/distro/depends/cci-depends @@ -0,0 +1,2 @@ +cifs-utils +cpio diff --git a/distro/depends/cci-makepkg b/distro/depends/cci-makepkg new file mode 100644 index 000000000..a7ee67537 --- /dev/null +++ b/distro/depends/cci-makepkg @@ -0,0 +1,10 @@ +curl +libarchive-tools +bzip2 +fakeroot +gnupg +gettext +openssl +ncurses-bin +binutils +cifs-utils -- 2.23.0
1 0
0 0
[PATCH compass-ci] sparrow/7-systemd: fix failed to resume dnsmasq and es service
by Liu Yinsi 03 Nov '20

03 Nov '20
[why] when execute sparrow/4-docker/buildall reboot, error: ==================== es ======================= [2020-11-02T10:24:23,046][INFO ][o.e.n.Node ] [] initializing ... [2020-11-02T10:24:23,084][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/srv/es/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])? at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140) ~[elasticsearch-6.4.3.jar:6.4.3] at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.4.3.jar:6.4.3] at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.4.3.jar:6.4.3] at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.4.3.jar:6.4.3] at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.4.3.jar:6.4.3] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.4.3.jar:6.4.3] at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.4.3.jar:6.4.3] =================== dnsmasq =================== dnsmasq: failed to bind DHCP server socket: Address in use because sometimes even if 'docker stop&&rm -f $container', there will still be a legacy process running, causing container to fail to start. [how] kill process before start container Signed-off-by: Liu Yinsi <liuyinsi(a)163.com> --- sparrow/7-systemd/cci-network | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sparrow/7-systemd/cci-network b/sparrow/7-systemd/cci-network index 6e59dbb..dfe7cc9 100755 --- a/sparrow/7-systemd/cci-network +++ b/sparrow/7-systemd/cci-network @@ -12,6 +12,9 @@ $CCI_SRC/sparrow/2-network/iptables $CCI_SRC/sparrow/2-network/nfs $CCI_SRC/sparrow/2-network/cifs +# fix failed to start container dnsmasq and es. +kill $(ps -ef| grep -E "dnsmasq|elasticsearch"| awk '{print $2}' ) 2> /dev/null + # --restart=always option is not absolutely reliable # container need to start its dependences firstly. $CCI_SRC/sparrow/4-docker/buildall reboot -- 2.23.0
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • ...
  • 210
  • Older →

HyperKitty Powered by HyperKitty