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 -----
  • August
  • July
  • 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

  • 1 participants
  • 5235 discussions
[PATCH compass-ci] delimiter/utils.rb: deal submit job failed
by Cao Xueliang 03 Feb '21

03 Feb '21
If we submit job failed, we get the response "xxx job id=0, error: xxx", we should match the response at first and return nil Signed-off-by: Cao Xueliang <caoxl78320(a)163.com> --- src/delimiter/utils.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/src/delimiter/utils.rb b/src/delimiter/utils.rb index 41b65de..3120ca6 100644 --- a/src/delimiter/utils.rb +++ b/src/delimiter/utils.rb @@ -69,6 +69,7 @@ module Utils save_job_to_yaml(job, PROCESS_JOB_YAML) response = %x(#{LKP_SRC}/sbin/submit #{PROCESS_JOB_YAML}) puts "submit job response: #{response}" + return nil if response =~ /job id=0/ return $1 if response =~ /job id=(.*)/ return nil -- 2.23.0
1 0
0 0
[PATCH compass-ci] providers/lib: introduce domain.rb action.rb
by Xiao Shenwei 03 Feb '21

03 Feb '21
function: based on response of boot.libvirt generate a domain.xml refer-to: commit 457644c0486e0786ed8b563c6e4928445eea0207 if you want to test with your domain.xml, define vt field in job.yaml vt: domain: xxx/xxx.xml if not will use default options to generate a domain.xml TODO: support combined templates --- providers/lib/action.rb | 75 +++++++++++++++++++++++++++++++++++++++++ providers/lib/domain.rb | 75 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 providers/lib/action.rb create mode 100644 providers/lib/domain.rb diff --git a/providers/lib/action.rb b/providers/lib/action.rb new file mode 100644 index 0000000..526d84d --- /dev/null +++ b/providers/lib/action.rb @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +# expand each element of the domain.xml +module Action + TEMPLATE_DIR = "#{ENV['CCI_SRC']}/providers/libvirt/templates" + def expand_erb(file) + @context.expand_erb(File.read(file)) + end + + def domain + @doc = Nokogiri::XML(expand_erb(@domain_option)) + end + + def name + @doc.xpath('//domain/name').remove + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/name.xml") + end + + def os + @doc.xpath('//domain/os').remove + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/os.xml") + end + + def emulator + @doc.xpath('//domain/devices/emulator').remove + @doc.xpath('//domain/devices')[0].add_child expand_erb("#{TEMPLATE_DIR}/emulator.xml") + end + + def cpu + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/cpu.xml") + end + + def memory + @doc.xpath('//domain/memory').remove + @doc.xpath('//domain/currentMemory').remove + @doc.xpath('//domain/maxMemory').remove + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/memory.xml") + end + + def devices + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/devices.xml") + end + + def disk + @context.info['disk'] ||= nil + @doc.xpath('//domain/devices')[0].add_child expand_erb("#{TEMPLATE_DIR}/disk.xml") + end + + def serial + @doc.xpath('//domain/devices/serial').remove + @doc.xpath('//domain/devices')[0].add_child expand_erb("#{TEMPLATE_DIR}/serial.xml") + end + + def interface + @doc.xpath('//domain/devices/interface').remove + @doc.xpath('//domain/devices')[0].add_child expand_erb("#{TEMPLATE_DIR}/interface.xml") + end + + def active + @doc.xpath('//domain/on_poweroff').remove + @doc.xpath('//domain/on_reboot').remove + @doc.xpath('//domain/on_crash').remove + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/active.xml") + end + + def clock + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/clock.xml") + end + + def seclabel + @doc.root.add_child expand_erb("#{TEMPLATE_DIR}/seclabel.xml") + end +end diff --git a/providers/lib/domain.rb b/providers/lib/domain.rb new file mode 100644 index 0000000..8df9c06 --- /dev/null +++ b/providers/lib/domain.rb @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +# frozen_string_literal: true + +require 'json' +require 'set' +require 'nokogiri' +require 'yaml' +require_relative 'action' +require_relative "#{ENV['LKP_SRC']}/lib/hashugar" + +# generate a domain.xml +class Domain + include Action + + TEMPLATE_DIR = "#{ENV['CCI_SRC']}/providers/libvirt/templates" + OPTION_FILE = "#{TEMPLATE_DIR}/options.yaml" + def initialize(context, logger) + @doc = nil + @context = context + @logger = logger + @options = Hashugar.new(YAML.safe_load(File.read(OPTION_FILE))) + end + + def generate + domain_option + if user_domain? + default_option + return + end + replaceable_option + default_option + end + + def save_to(filename) + File.open(filename, 'w') do |f| + f.puts @doc.to_xml + end + File.realpath(filename) + end + + private + + def user_domain? + @context.info['vt'].key?('domain') + end + + def load_xml_file(filepath) + host = @context.info['SRV_HTTP_HOST'] + port = @context.info['SRV_HTTP_PORT'] + system "wget --timestamping --progress=bar:force http://#{host}:#{port}/cci/libvirt-xml/#{filepath}" + %x(basename #{filepath}).chomp + end + + def domain_option + @domain_option = "#{TEMPLATE_DIR}/#{(a)options.domain}.xml" + if user_domain? + @domain_option = load_xml_file((a)context.info['vt']['domain']) + end + @logger.info("Domain option: #{@domain_option}") + domain + end + + def default_option + @options.default.each do |one| + instance_eval one + end + end + + def replaceable_option + @options.replaceable.each do |one| + instance_eval one + end + end +end -- 2.23.0
1 0
0 0
[PATCH lkp-tests] distro/debian: force install without upgrade
by Wang Yong 03 Feb '21

03 Feb '21
[Why] when install exist package, it will be upgrade and may throw many dpkg warnings like: files list file for package 'libgme0:arm64' missing; assuming package has no files currently installed now force install package without upgrade it by add --no-upgrade --no-upgrade Do not upgrade packages. When used in conjunction with install, no-upgrade will prevent packages listed from being upgraded if they are already installed. ref: https://linux.die.net/man/8/apt-get Signed-off-by: Wang Yong <wangyong0117(a)qq.com> --- distro/debian | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distro/debian b/distro/debian index 8821e3ddd..9b6636f48 100755 --- a/distro/debian +++ b/distro/debian @@ -193,7 +193,7 @@ distro_install_depends() do $chronic apt-get -o Dpkg::Options::=--force-confdef \ -o Dpkg::Options::=--force-confold \ - install -y $package + install -y --no-upgrade $package done done } -- 2.23.0
1 0
0 0
[PATCH compass-ci] sparrow/4-docker: split function to build and run container
by Liu Yinsi 03 Feb '21

03 Feb '21
[how] before: build_depends -> do_one: build and run container's depends and itself in parallel after: build_depends -> do_one_build: build container's depends and itself in parallel start_depends -> do_one_run: run container's depends and itself not in parallel [why] build_depends just build container, start_depends just run container, it will make logic more clear. Signed-off-by: Liu Yinsi <liuyinsi(a)163.com> --- sparrow/4-docker/buildall | 53 ++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/sparrow/4-docker/buildall b/sparrow/4-docker/buildall index c676e6f..d4e9419 100755 --- a/sparrow/4-docker/buildall +++ b/sparrow/4-docker/buildall @@ -17,10 +17,10 @@ build_depends() done wait - do_one $container + do_one_build $container } -do_one() +do_one_build() { local container=$1 local container_name=$(basename $container) @@ -29,30 +29,53 @@ do_one() mkdir $tmpdir/$container_name 2>/dev/null && ( cd "$container" - [ "$container_name" == 'ssh-r' ] && exit - docker images | grep -wq "$container_name" - if [ "$?" != 0 ] || [ "$action" != "run-only" ]; then - log_info "start build $container." + log_info "start build $container." - [ -x build ] && ./build - [ -x install ] && ./install + [ -x build ] && ./build + [ -x install ] && ./install - log_info "finish build $container." - fi - [ -x first-run ] && ./first-run - [ -x start ] && ./start - [ "$container_name" == 'initrd-lkp' ] && ./run + log_info "finish build $container." ) lockfile-remove --lock-name "$container_name".lock } +start_depends() +{ + local container=$1 + + for dep in $(cat $container/start-depends 2> /dev/null) + do + start_depends $CONTAINER_PATH/$dep + done + + do_one_run $container +} + +do_one_run() +{ + local container=$1 + local container_name=$(basename $container) + + cd "$container" + [ -x first-run ] && ./first-run + [ -x start ] && ./start + [ "$container_name" == 'initrd-lkp' ] && ./run +} + tmpdir=$(mktemp -d) for dir in $CONTAINER_PATH/*/ do - build_depends $dir & + container_name=$(basename $dir) + [ "$container_name" == 'ssh-r' ] && continue + + docker images | grep -wq "$container_name" + if [ "$?" != 0 ] || [ "$action" != "run-only" ]; then + build_depends $dir & + wait + fi + start_depends $dir done -wait rm -fr $tmpdir -- 2.23.0
1 0
0 0
[PATCH compass-ci] container/delimiter: fix failed to build docker image
by Liu Yinsi 03 Feb '21

03 Feb '21
when execute delimiter/build: `push_image delimiter:latest` [error] The push refers to repository [$DOCKER_REGISTRY_HOST:5001/delimiter] Get http://$DOCKER_REGISTRY_PORT:5001/v2/: dial tcp $DOCKER_REGISTRY_HOST:5001:connect: connection refused [why] container registry service port is 5001, connect failed 5001 because registry not ready, so add build-depends. Signed-off-by: Liu Yinsi <liuyinsi(a)163.com> --- container/delimiter/build-depends | 1 + 1 file changed, 1 insertion(+) create mode 100755 container/delimiter/build-depends diff --git a/container/delimiter/build-depends b/container/delimiter/build-depends new file mode 100755 index 0000000..14bc599 --- /dev/null +++ b/container/delimiter/build-depends @@ -0,0 +1 @@ +registry -- 2.23.0
3 2
0 0
[PATCH v2 compass-ci 1/2] doc: add job/os_mount.md
by Yu Chuan 03 Feb '21

03 Feb '21
Add description of os_mount field in job.yaml. This patch is the description when os_mount=local, and other values of os_mount will be added in the patch later. Signed-off-by: Yu Chuan <13186087857(a)163.com> --- doc/job/os_mount.md | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/job/os_mount.md diff --git a/doc/job/os_mount.md b/doc/job/os_mount.md new file mode 100644 index 000000000000..141335c3ee4b --- /dev/null +++ b/doc/job/os_mount.md @@ -0,0 +1,62 @@ +# Summary +========= + +`os_mount` defines the mount method of tbox's root partition. + +It has the following optional values: + - nfs + - cifs + - initramfs + - container + - local + +Usage example: + - submit iperf.yaml testbox=vm-2p8g os_mount=nfs + - submit iperf.yaml testbox=vm-2p8g os_mount=cifs + - submit iperf.yaml testbox=vm-2p8g os_mount=initramfs + - submit iperf.yaml testbox=dc-8g os_mount=container + - submit iperf.yaml testbox=vm-2p8g os_mount=local + +# Optional Values +================= + +## Work flow when os_mount=local + +1. user submit job with os_mount: local + optional kernel cmdline params: # can be added in kernel_append_root field of job.yaml + - keep_last_root: keep the original data of disk what last job generated, don't wipe it + +2. scheduler return the ipxe_str to tbox + ``` + dhcp + initrd http://${http_server_ip}:${http_server_port}/os/openeuler/aarch64/20.03-iso/initrd.lkp + initrd http://${http_server_ip}:${http_server_port}/os/openeuler/aarch64/20.03-iso/boot/vmlinuz + imgargs vmlinux root=/dev/mapper/os-openeuler_aarch64_20.03 rootfs_src={nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} initrd=initrd.lkp {kernel_append_root} + boot + ``` + +3. boot + - check if `/dev/mapper/os-openeuler_aarch64_20.03_{timestamp}` exist # according the kernel cmdline + - if exist: + - if `keep_last_root` not in kernel cmdline params: + - re-create(lvremove and lvcreate) rw logical volume /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} + - boot from /dev/mapper/os-openeuler_aarch64_20.03 + - if `keep_last_root` in kernel cmdline params: + - if /dev/mapper/os-openeuler_aarch64_20.03 exists: + - boot from /dev/mapper/os-openeuler_aarch64_20.03 + - if /dev/mapper/os-openeuler_aarch64_20.03 not exists: + - generate /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03-{timestamp} + - boot from /dev/mapper/os-openeuler_aarch64_20.03 + - if not exist: + ``` + mount -t nfs {nfs_server_ip}:os/openeuler/aarch64/20.03-iso-snapshots/{timestamp} /mnt + create /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} according rootfs_disk. # logical volume size: 10G + mkdir /mnt1, mount /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} /mnt1 + rsync -az /mnt/. /mnt1/ + umount /mnt /mnt1 + lvchange -p r /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} + creat rw logical volume /dev/mapper/os-openeuler_aarch64_20.03 from /dev/mapper/os-openeuler_aarch64_20.03_{timestamp} + boot from /dev/mapper/os-openeuler_aarch64_20.03 + ``` + +4. execute the job -- 2.23.0
2 3
0 0
[PATCH compass-ci] register-accounts: sync register-accounts
by Luan Shengde 03 Feb '21

03 Feb '21
[why] the required file lib/build_my_info_client has been updated. and the invoking way has some change. just do update according to the change. Signed-off-by: Luan Shengde <shdluan(a)163.com> --- container/register-accounts/register-accounts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/container/register-accounts/register-accounts b/container/register-accounts/register-accounts index ff69032..519f289 100755 --- a/container/register-accounts/register-accounts +++ b/container/register-accounts/register-accounts @@ -9,7 +9,12 @@ require_relative "#{ENV['CCI_SRC']}/lib/build_my_info_client" content = YAML.load_file('/etc/compass-ci/register/register.yaml') content.each do |key, value| - build_my_info = BuildMyInfo.new(value['my_email'], value['my_name'], ENV['lab']) - build_my_info.store_account_info + my_info = {} + my_info['my_email'] = value['my_email'] + my_info['my_name'] = value['my_name'] + my_info['lab'] = ENV['lab'] + + build_my_info = BuildMyInfo.new(my_info['my_email']) + build_my_info.store_account_info(my_info) end sleep -- 2.23.0
2 1
0 0
[PATCH v2 compass-ci] container/openresty-proxy-cache: fix build error
by Liu Yinsi 03 Feb '21

03 Feb '21
when execute openresty-proxy-cache/build, if openresty already exists [error] fatal: destination path 'openresty' already exists and is not an empty directory. [how] delete openresty before git clone. Signed-off-by: Liu Yinsi <liuyinsi(a)163.com> --- container/openresty-proxy-cache/build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/container/openresty-proxy-cache/build b/container/openresty-proxy-cache/build index 0846197..2c982f7 100755 --- a/container/openresty-proxy-cache/build +++ b/container/openresty-proxy-cache/build @@ -2,6 +2,8 @@ # SPDX-License-Identifier: MulanPSL-2.0+ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. +rm -rf openresty + git clone https://gitee.com/cuiyili/openresty.git || exit 1 docker build -t openresty:proxy_cache . -f openresty/Dockerfile -- 2.23.0
1 0
0 0
[PATCH compass-ci] sparrow/1-storage: add work dir and set permission
by Liu Yinsi 03 Feb '21

03 Feb '21
add work dir and permission to use libvirt to boot testbox. Signed-off-by: Liu Yinsi <liuyinsi(a)163.com> --- sparrow/1-storage/permission | 2 ++ sparrow/1-storage/tiny | 1 + 2 files changed, 3 insertions(+) diff --git a/sparrow/1-storage/permission b/sparrow/1-storage/permission index d1367cf..0e8d722 100755 --- a/sparrow/1-storage/permission +++ b/sparrow/1-storage/permission @@ -7,6 +7,7 @@ chown -R mailer:team /srv/cci/Maildir chown lkp:lkp /srv/cache/netdata_cache chown lkp:lkp /srv/cache/netdata_lib chown lkp:lkp /srv/cci/serial/fluentd-pos +chown lkp:lkp /srv/cci/libvirt-xml chown lkp:committer /srv/git chgrp team /srv/cci/serial/logs chmod 775 /srv/result @@ -15,6 +16,7 @@ chmod 775 /srv/es chmod 775 /srv/cache/netdata_cache chmod 775 /srv/cache/netdata_lib chmod 775 /srv/cci/serial/logs +chmod 775 /srv/cci/libvirt-xml chmod 775 /srv/cci/serial/fluentd-pos chmod -R 775 /srv/cci/Maildir diff --git a/sparrow/1-storage/tiny b/sparrow/1-storage/tiny index e589937..8fd3652 100755 --- a/sparrow/1-storage/tiny +++ b/sparrow/1-storage/tiny @@ -17,6 +17,7 @@ dirs=( /srv/cci/scheduler /srv/cci/serial/logs /srv/cci/serial/fluentd-pos + /srv/cci/libvirt-xml /tftpboot /c /etc/qemu -- 2.23.0
2 2
0 0
Re: [PATCH compass-ci] container/openresty-proxy-cache: fix build error
by Liu Yinsi 03 Feb '21

03 Feb '21
>> git clone https://gitee.com/cuiyili/openresty.git || exit 1 >> docker build -t openresty:proxy_cache . -f openresty/Dockerfile >>+rm -rf openresty > >How about move the 'rm' step at the before of 'docker build'? docker build need openrestry/Dockerfile, this file come from git clone https://gitee.com/cuiyili/openresty.git, you mean move before of git clone? it looks not make any difference. Thanks, Yinsi > >-------- >Thanks >Yu Chuan > >>-- >>2.23.0 >>
2 2
0 0
  • ← Newer
  • 1
  • ...
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • ...
  • 524
  • Older →

HyperKitty Powered by HyperKitty