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

January 2021

  • 24 participants
  • 859 discussions
[PATCH compass-ci] providers/qemu: fix script hangs when $initrds is null
by Liu Yinsi 18 Jan '21

18 Jan '21
[Error Msg] ++ set_initrd ++ initrd=initrd ++ cat <<< hang here [Root Cause] Function set_initrd() have follow line: cat $initrds > $initrd when $initrds is null, the script will hang when execute cat command. [how] before: [ -n "$initrds" ] || exit after: [ -n "$initrds" ] && cat $initrds > initrd || exit [why] 1. before execute cat command, check wether initrds is null. 2. initrd is a brief file name, it can be used directly, so remove $initrd, just us initrd. 3. set_initrd() is unnecessary, so remove. Signed-off-by: Liu Yinsi <liuyinsi(a)163.com> --- providers/qemu/kvm.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/providers/qemu/kvm.sh b/providers/qemu/kvm.sh index 854e913..52b10f2 100755 --- a/providers/qemu/kvm.sh +++ b/providers/qemu/kvm.sh @@ -60,13 +60,7 @@ check_option_value() # debian has both qemu-system-x86_64 and qemu-system-riscv64 command [[ $kernel =~ 'riscv64' ]] && qemu=qemu-system-riscv64 - [ -n "$initrds" ] || exit -} - -set_initrd() -{ - initrd=initrd - cat $initrds > $initrd + [ -n "$initrds" ] && cat $initrds > initrd || exit } set_bios() @@ -125,7 +119,7 @@ public_option() kvm=( $qemu -kernel $kernel - -initrd $initrd + -initrd initrd -smp $nr_cpu -m $memory -rtc base=localtime @@ -183,7 +177,6 @@ run_qemu() set_options() { - set_initrd set_bios set_helper set_nic -- 2.23.0
1 0
0 0
[PATCH v2 compass-ci] scheduler: default queue for libvirt
by Ren Wen 18 Jan '21

18 Jan '21
testbox : vt-2p8g -> tbox_group : vt-2p8g -> default queue : vt-2p8g.<arch> Signed-off-by: Ren Wen <15991987063(a)163.com> --- src/lib/job.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 03ca5af..7d08610 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -310,7 +310,7 @@ class Job # set default value self["queue"] = tbox_group - if tbox_group.to_s.starts_with?(/(vm|dc)-/) + if tbox_group.to_s.starts_with?(/(vm|dc|vt)-/) self["queue"] = "#{tbox_group}.#{arch}" end end -- 2.23.0
1 0
0 0
[PATCH compass-ci] scheduler: default queue for libvirt type
by Ren Wen 18 Jan '21

18 Jan '21
testbox : libvirt-2p8g -> default queue : libvirt-2p8g.<arch> Signed-off-by: Ren Wen <15991987063(a)163.com> --- src/lib/job.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 1d25236..5667842 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -306,7 +306,7 @@ class Job # set default value self["queue"] = tbox_group - if tbox_group.to_s.starts_with?(/(vm|dc)-/) + if tbox_group.to_s.starts_with?(/(vm|dc|libvirt)-/) self["queue"] = "#{tbox_group}.#{arch}" end end -- 2.23.0
2 2
0 0
[PATCH v2 lkp-tests] hosts: add new host file for libvirt
by Xiao Shenwei 18 Jan '21

18 Jan '21
[why] libvirt use a xml file to start vm <os> <kernel>xxx</kernel> <initrd>xxx</initrd> <cmdline>xxx</cmdline> </os> so, we can submit job use os_mount=initramfs to get kernel and initrd absolute path. Minimum memory limit: 16G Signed-off-by: Xiao Shenwei <xiaoshenwei96(a)163.com> --- hosts/vt-2p16g | 5 +++++ hosts/vt-2p32g | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 hosts/vt-2p16g create mode 100644 hosts/vt-2p32g diff --git a/hosts/vt-2p16g b/hosts/vt-2p16g new file mode 100644 index 000000000..aecbb7948 --- /dev/null +++ b/hosts/vt-2p16g @@ -0,0 +1,5 @@ +provider: libvirt +template: kvm +nr_node: 1 +nr_cpu: 2 +memory: 16G diff --git a/hosts/vt-2p32g b/hosts/vt-2p32g new file mode 100644 index 000000000..aa7c8c065 --- /dev/null +++ b/hosts/vt-2p32g @@ -0,0 +1,5 @@ +provider: libvirt +template: kvm +nr_node: 1 +nr_cpu: 2 +memory: 32G -- 2.23.0
1 0
0 0
[PATCH lkp-tests] jobs: split fault_reproduction.yaml
by Wei Jihui 18 Jan '21

18 Jan '21
[why] user can choose when to ssh, use ssh.yaml is ssh when task normal finish use ssh-on-fail.yaml is ssh when task is failed use ssh-always is ssh always whether task is failed or not. [usage] submit -i ssh.yaml job.yaml Signed-off-by: Wei Jihui <weijihuiall(a)163.com> --- jobs/ssh-always.yaml | 4 ++++ jobs/ssh-on-fail.yaml | 12 ++++++++++++ jobs/{fault_reproduction.yaml => ssh.yaml} | 4 ---- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 jobs/ssh-always.yaml create mode 100644 jobs/ssh-on-fail.yaml rename jobs/{fault_reproduction.yaml => ssh.yaml} (80%) diff --git a/jobs/ssh-always.yaml b/jobs/ssh-always.yaml new file mode 100644 index 00000000..0166fe12 --- /dev/null +++ b/jobs/ssh-always.yaml @@ -0,0 +1,4 @@ +# ssh to testbox and sleep always + +<< : jobs/ssh.yaml +<< : jobs/ssh-on-fail.yaml diff --git a/jobs/ssh-on-fail.yaml b/jobs/ssh-on-fail.yaml new file mode 100644 index 00000000..5f28d001 --- /dev/null +++ b/jobs/ssh-on-fail.yaml @@ -0,0 +1,12 @@ +ssh_pub_key: + <%= + begin + File.read("#{ENV['HOME']}/.ssh/id_rsa.pub").chomp + rescue + nil + end + %> + +on_fail: + sshd: + sleep: 6h diff --git a/jobs/fault_reproduction.yaml b/jobs/ssh.yaml similarity index 80% rename from jobs/fault_reproduction.yaml rename to jobs/ssh.yaml index 46a1e042..11e5b175 100644 --- a/jobs/fault_reproduction.yaml +++ b/jobs/ssh.yaml @@ -8,7 +8,3 @@ ssh_pub_key: %> sshd: sleep: 6h - -on_fail: - sshd: - sleep: 6h -- 2.23.0
3 4
0 0
[PATCH v2 compass-ci] lib/job.cr: enable the account check function
by Wu Zhende 18 Jan '21

18 Jan '21
Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- src/lib/job.cr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 03ca5af..db9616b 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -392,15 +392,15 @@ class Job private def check_account_info error_msg = "Failed to verify the account.\n" error_msg += "Please refer to https://gitee.com/wu_fengguang/compass-ci/blob/master/doc/manual/apply-acco…" + account_info = @es.get_account(self["my_email"]) - # raise account_info unless account_info.is_a?(JSON::Any) + raise error_msg unless account_info.is_a?(JSON::Any) - # @account_info = account_info.as_h - @account_info = account_info.as_h if account_info.is_a?(JSON::Any) + @account_info = account_info.as_h - # raise error_msg if @account_info["found"]? == false - # raise error_msg unless self["my_name"] == @account_info["my_name"].to_s - # raise error_msg unless self["my_token"] == @account_info["my_token"] + raise error_msg if @account_info["found"]? == false + raise error_msg if self["my_name"] != @account_info["my_name"].to_s + raise error_msg if self["my_token"] != @account_info["my_token"] @hash.delete("my_uuid") @hash.delete("my_token") -- 2.23.0
2 1
0 0
[PATCH compass-ci] lib/job.cr: auto install cgz with lkp
by Wei Jihui 18 Jan '21

18 Jan '21
[why] tests need some common softwares which at lkp-tests/distro/depend/lkp. initramfs-common just for initramfs os, it is not enough. Signed-off-by: Wei Jihui <weijihuiall(a)163.com> --- src/lib/job.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/job.cr b/src/lib/job.cr index 07bfda0..ae1f170 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -556,7 +556,7 @@ class Job private def get_depends_initrd(program_params, initrd_deps_arr, initrd_pkg_arr) initrd_http_prefix = "http://#{INITRD_HTTP_HOST}:#{INITRD_HTTP_PORT}" mount_type = os_mount == "cifs" ? "nfs" : os_mount.dup - program_params["initramfs-common"] = JSON::Any.new("") if os_mount == "initramfs" + program_params["lkp"] = JSON::Any.new("") program_params.keys.each do |program| if program =~ /^(.*)-\d+$/ -- 2.23.0
2 1
0 0
[PATCH lkp-tests] distro/depends: merge initramfs-common to lkp
by Wei Jihui 18 Jan '21

18 Jan '21
all type os will use distro/depends/lkp Signed-off-by: Wei Jihui <weijihuiall(a)163.com> --- distro/depends/initramfs-common | 4 ---- distro/depends/lkp | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 distro/depends/initramfs-common diff --git a/distro/depends/initramfs-common b/distro/depends/initramfs-common deleted file mode 100644 index 5f766da6..00000000 --- a/distro/depends/initramfs-common +++ /dev/null @@ -1,4 +0,0 @@ -time -wget -perf -which diff --git a/distro/depends/lkp b/distro/depends/lkp index 82c67184..4b51c803 100644 --- a/distro/depends/lkp +++ b/distro/depends/lkp @@ -1,4 +1,7 @@ bc +git +wget +perf gawk time kmod -- 2.23.0
2 1
0 0
[PATCH lkp-tests] sbin/submit: add parameter option -i for submit
by Wei Jihui 18 Jan '21

18 Jan '21
[usage] 1. submit -i include.yaml job.yaml this will add include.yaml content to job.yaml, and priority is higher than job.yaml 2. submit -i 1.yaml -i 2.yaml job.yaml this will add 1.yaml and 2.yaml to job.yaml Signed-off-by: Wei Jihui <weijihuiall(a)163.com> --- lib/job.rb | 12 ++++++++---- sbin/submit | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lib/job.rb b/lib/job.rb index 631ebfc9..1650eb2f 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -215,6 +215,7 @@ class Job attr_accessor :overrides attr_accessor :defaults attr_accessor :cmdline_defaults + attr_accessor :include_yamls def initialize(job = {}, defaults = {}, overrides = {}, cmdline_defaults={}) @job = job @@ -222,6 +223,7 @@ class Job @overrides = overrides # from command line @cmdline_defaults = cmdline_defaults # from command line @available_programs = {} + @include_yamls = [] end def source_file_symkey(file) @@ -254,8 +256,8 @@ class Job @overrides.merge!(hash['override']){ |_key, a, _b| a} hash.delete('override') end - hash.merge!(@overrides) - hash.merge!(fault_reproduction) if hash.has_key?("id") + hash.merge!(@overrides) unless @overrides.empty? + hash.merge!(load_include_yamls) unless @include_yamls.empty? @jobs.concat(multi_args(hash)) # return [hash] or [h1,h2] end rescue StandardError => e @@ -286,8 +288,10 @@ class Job @jobfile = jobfile end - def fault_reproduction - wait = load_yaml("#{lkp_src}/jobs/fault_reproduction.yaml", {}) + def load_include_yamls + include_hash = {} + include_hash[comment_to_symbol('auto generated by load_include_yamls()')] = nil + include_hash.merge!(load_yaml_merge(@include_yamls, {})) end def multi_args(hash) diff --git a/sbin/submit b/sbin/submit index 39cdcf57..6eca3b6e 100755 --- a/sbin/submit +++ b/sbin/submit @@ -14,6 +14,7 @@ opt_set_key_value = {} opt_cmdline_defaults = {} opt_output_dir = nil opt_auto_define_files = false +opt_include_yamls = [] opt_monitor = false opt_monitor_query = {} opt_my_queue = false @@ -43,6 +44,10 @@ options = OptionParser.new do |opts| opt_auto_define_files = true end + opts.on('-i include.yaml', '--include include.yaml', 'include other job yamls') do |yaml| + opt_include_yamls << yaml + end + opts.on('-c', '--connect', 'auto connect to the host') do actions << 'connect' end @@ -103,6 +108,14 @@ def find_jobfile(jobfile) exit 1 end +def find_jobfiles(jobfile_list) + search_jobfile_list = [] + jobfile_list.each do |jobfile| + search_jobfile_list << find_jobfile(jobfile) + end + return search_jobfile_list +end + submit_id = %x(uuidgen).chomp puts "submit_id=#{submit_id}" @@ -111,6 +124,7 @@ ARGV.each do |jobfile| jobs = Job2sh.new jobs.cmdline_defaults = opt_cmdline_defaults jobs.overrides = opt_set_key_value + jobs.include_yamls = find_jobfiles(opt_include_yamls) jobs.load(jobfile, true) || next jobs[:expand_params] = true jobs['testbox'] = opt_set_key_value['testbox'] if opt_set_key_value['testbox'] -- 2.23.0
3 2
0 0
[PATCH v2 compass-ci 3/3] docker/docker.rb: add docker serial log
by Wu Zhende 18 Jan '21

18 Jan '21
Generate serial log file. And add the start and end flags into it. It's for generate docker's dmsg file in result root. Signed-off-by: Wu Zhende <wuzhende666(a)163.com> --- providers/docker/docker.rb | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/providers/docker/docker.rb b/providers/docker/docker.rb index 8e489c6..e1ab057 100755 --- a/providers/docker/docker.rb +++ b/providers/docker/docker.rb @@ -18,6 +18,7 @@ names = Set.new %w[ defaults = relevant_defaults(names) SCHED_HOST = defaults['SCHED_HOST'] || '172.17.0.1' SCHED_PORT = defaults['SCHED_PORT'] || 3000 +LOG_DIR = '/srv/cci/serial/logs' def get_url(hostname) "http://#{SCHED_HOST}:#{SCHED_PORT}/boot.container/hostname/#{hostname}" @@ -82,12 +83,35 @@ def start_container(hostname, load_path, hash) docker_image = hash['docker_image'] system "#{ENV['CCI_SRC']}/sbin/docker-pull #{docker_image}" system( - { 'hostname' => hostname, 'docker_image' => docker_image, 'load_path' => load_path }, + { 'hostname' => hostname, + 'docker_image' => docker_image, + 'load_path' => load_path, + 'log_dir' => "#{LOG_DIR}/#{hostname}" + }, ENV['CCI_SRC'] + '/providers/docker/run.sh' ) clean_dir(load_path) end +def record_runtime_log(hostname, start_time: Time.new, is_start: true, hash: {}) + log_file = "#{LOG_DIR}/#{hostname}" + if is_start + File.open(log_file, 'w') do |f| + # fluentd refresh time is 1s + # let fluentd to monitor this file first + sleep(2) + f.puts "\n#{start_time.strftime('%Y-%m-%d %H:%M:%S')} starting DOCKER" + f.puts "\n#{hash['job']}" + end + return start_time + end + + duration = ((Time.new - start_time) / 60).round(2) + File.open(log_file, 'a') do |f| + f.puts "\nTotal DOCKER duration: #{duration} minutes" + end +end + def main(hostname, queues) set_host2queues(hostname, queues) url = get_url hostname @@ -95,10 +119,14 @@ def main(hostname, queues) hash = parse_response url return del_host2queues(hostname) if hash.nil? + start_time = record_runtime_log(hostname, hash: hash) + load_path = build_load_path(hostname) load_initrds(load_path, hash) start_container(hostname, load_path, hash) + del_host2queues(hostname) + record_runtime_log(hostname, start_time: start_time, is_start: false) end def loop_main(hostname, queues) -- 2.23.0
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • ...
  • 86
  • Older →

HyperKitty Powered by HyperKitty