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

  • 5230 discussions
[PATCH v2 lkp-tests 03/11] feat: step 3 of iso2rootfs: copy out rootfs in second boot stage
by Yu Chuan 10 Mar '21

10 Mar '21
Framework of install-iso-sync-rootfs. Signed-off-by: Yu Chuan <13186087857(a)163.com> --- jobs/install-iso-sync-rootfs.yaml | 22 +++++++++++++++ tests/install-iso-sync-rootfs | 46 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 jobs/install-iso-sync-rootfs.yaml create mode 100755 tests/install-iso-sync-rootfs diff --git a/jobs/install-iso-sync-rootfs.yaml b/jobs/install-iso-sync-rootfs.yaml new file mode 100644 index 000000000000..0235b10c718b --- /dev/null +++ b/jobs/install-iso-sync-rootfs.yaml @@ -0,0 +1,22 @@ +suite: install-iso-sync-rootfs +category: benchmark +install-iso-sync-rootfs: + ################# + # nfs target path: ${NFS_SERVER_HOST}:${NFS_ROOT_DIR}/${iso_os}/${iso_arch}/${iso_version} + ################# + iso_os: + iso_arch: + iso_version: + NFS_SERVER_HOST: + NFS_ROOT_DIR: + + ################# + # result rootfs suffix, format: $(date "+%Y%m%d%H%M%S") + ################# + ROOTFS_SUFFIX: + + ################# + # name of volume group which stores the logical volume of rootfs + ################# + VG_NAME: + diff --git a/tests/install-iso-sync-rootfs b/tests/install-iso-sync-rootfs new file mode 100755 index 000000000000..e5de4d72240e --- /dev/null +++ b/tests/install-iso-sync-rootfs @@ -0,0 +1,46 @@ +#!/bin/bash +# SPDX-License-Identifier: MulanPSL-2.0+ +# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. + +set -e + +. $LKP_SRC/lib/debug.sh +. $LKP_SRC/lib/log.sh + +check_params() +{ + log_info "start check params" + + local required_vars=( + "iso_os" + "iso_arch" + "iso_version" + "NFS_SERVER_HOST" + "NFS_ROOT_DIR" + + "ROOTFS_SUFFIX" + "VG_NAME" + ) + + for i in "${required_vars[@]}" + do + [ -n "$(eval echo \$$i)" ] || die "cannot get value of var: $i" + done +} + +sync_rootfs_to_nfs_server() +{ + : +} + +main() +{ + check_params + + sync_rootfs_to_nfs_server + + lvchange --permission r /dev/mapper/${VG_NAME}-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX} || + die "change logical volume permission to readonly failed:/dev/mapper/${VG_NAME}-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX}" +} + +main -- 2.23.0
1 0
0 0
[PATCH v2 lkp-tests 02/11] feat: step 2 of iso2rootfs: reboot directly in firstboot stage
by Yu Chuan 10 Mar '21

10 Mar '21
[Why] Firstboot stage: the first boot after iso installation is complete. At this stage, the system will run some initial configurations. So we need copy out the rootfs in second boot stage, and do nothing in firstboot stage. Signed-off-by: Yu Chuan <13186087857(a)163.com> --- jobs/install-iso-firstboot.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 jobs/install-iso-firstboot.yaml diff --git a/jobs/install-iso-firstboot.yaml b/jobs/install-iso-firstboot.yaml new file mode 100644 index 000000000000..7be9eaaab184 --- /dev/null +++ b/jobs/install-iso-firstboot.yaml @@ -0,0 +1,10 @@ +suite: install-iso-firstboot + +sleep: 1 + +# os_mount must be equal to 'local' +os_mount: local + +# kernel_custom_params must have 'boot_lv_suffix' and 'src_lv_suffix', +# and they must be the same. so can boot from the specify logical volume +kernel_custom_params: -- 2.23.0
1 0
0 0
[PATCH v2 lkp-tests 01/11] feat: step 1 of iso2rootfs: install iso to testbox and reboot
by Yu Chuan 10 Mar '21

10 Mar '21
[Why] When testbox request job in pxe -> ipxe step, scheduler returns a response composed of ipxe cmd. So we add 'custom_ipxe' field of job.yaml, then we can customize the response what testbox get, then testbox can auto install iso by executing the specified ipxe cmd. Signed-off-by: Yu Chuan <13186087857(a)163.com> --- jobs/install-iso.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 jobs/install-iso.yaml diff --git a/jobs/install-iso.yaml b/jobs/install-iso.yaml new file mode 100644 index 000000000000..bcccc6b76f85 --- /dev/null +++ b/jobs/install-iso.yaml @@ -0,0 +1,3 @@ +suite: install-iso + +custom_ipxe: -- 2.23.0
1 0
0 0
[PATCH lkp-tests 11/11] install-iso-pre: add step: submit install-iso-release.yaml
by Yu Chuan 10 Mar '21

10 Mar '21
Signed-off-by: Yu Chuan <13186087857(a)163.com> --- tests/install-iso-pre | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/install-iso-pre b/tests/install-iso-pre index 17a821cf3c14..4d6bae205f19 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -248,7 +248,22 @@ submit_install_iso_firstboot_yaml() submit_install_iso_release_yaml() { - : + log_info "start submit install-iso-release.yaml" + + local release_yaml="${LKP_SRC}/jobs/install-iso-release.yaml" + [ -f "${release_yaml}" ] || die "cannot find ${release_yaml}" + + ${LKP_SRC}/sbin/submit \ + ${release_yaml} \ + suite=install-iso-release-${ROOTFS_SUFFIX} \ + iso_os=${iso_os} \ + iso_arch=${iso_arch} \ + iso_version=${iso_version} \ + NFS_SERVER_HOST=${NFS_SERVER_HOST} \ + NFS_ROOT_DIR=${NFS_ROOT_DIR} \ + ROOTFS_SUFFIX=${ROOTFS_SUFFIX} \ + VG_NAME=${VG_NAME} \ + testbox=$testbox || die "submit ${release_yaml} failed" } main() -- 2.23.0
2 2
0 0
[PATCH v2 lkp-tests] add test script for dockerfile os migrating
by Bai Jing 10 Mar '21

10 Mar '21
Signed-off-by: Bai Jing <799286817(a)qq.com> --- tests/openeuler_docker | 142 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100755 tests/openeuler_docker diff --git a/tests/openeuler_docker b/tests/openeuler_docker new file mode 100755 index 000000000..d713924bf --- /dev/null +++ b/tests/openeuler_docker @@ -0,0 +1,142 @@ +#!/bin/sh +# - dockerfile_url + +# exit 1 if openEuler failed +# exit 0 if +# - no centos support +# - centos failed + +. $LKP_SRC/lib/debug.sh +. $LKP_SRC/lib/log.sh + +[ -n "$dockerfile_url" ] || die "dockerfile_url is empty" + +cd $BENCHMARK_ROOT + +nr_openeuler_fail=0 + +fit_repo() +{ + yum reinstall -y git + git clone "$dockerfile_url" || exit 0 + file_dir=$(find ./ -type f -name "*Dockerfile*" | xargs grep -HE '^FROM centos:(centos|)[78]') + [ -n "$file_dir" ] || { + echo "current-repo-not-support-centos: 1" + exit 0 + } +} + +openeuler_ready() +{ + docker load < $BENCHMARK_ROOT/openeuler_docker/openeuler-20.03-lts-v1.tar +} + +centos_docker() +{ + flag=0 + i=1 + for file in $(find ./ -type f -name "*Dockerfile*" | xargs grep -HE '^FROM centos:(centos|)[78]' | awk -F: '{print $1}') + do + file_dir=${file%/*} + image=$(echo "$file" | awk -F '/' '{print $3}' | tr 'A-Z' 'a-z') + [ -n "$image" ] || image=${file#*/}_$i + if [ -f "$file_dir/build.sh" ] && [ -x "$file_dir/build.sh" ]; then + "$file_dir/build.sh" > /dev/null 2> /dev/null && { + handle_dockerfile + } + else + docker_build > /dev/null 2> /dev/null && { + handle_dockerfile + } + fi + let i++ + done + if [ "$nr_openeuler_fail" != 0 ]; then + echo "openeuler failed times: $nr_openeuler_fail" + echo "openeuler_valid_url: $dockerfile_url" + exit 1 + else + echo "current-repo-not-support-centos: 1" + exit 0 + fi +} + +handle_FROM() +{ + sed -i "s/^FROM .*/FROM openeuler-20.03-lts:v1/g" "$file" + +} + +handle_epel() +{ + grep -qw "epel-release" "$file" && { + sed -i "s/epel-release/bash/g" "$file" + } +} + +handle_epelrpm() +{ + + grep -qw "https://.*epel-release.*rpm" "$file" && { + sed -i "s|https://.*epel-release.*rpm|bash|g" "$file" + + } +} + +add_base_commands() +{ + # grep -qw "groupadd*" "$file" && { + # fix missing useradd, groupadd, chpasswd, etc. commands + sed -i '/FROM /a\RUN yum -y install shadow tar' "$file" +} + +handle_epel_repo() +{ + sed -i '/.* wget .*(epel|CentOS-Base)\.repo/ s|^|#|g' "$file" +} + +handle_dockerfile() +{ + flag=1 + handle_FROM + handle_epel + add_base_commands + if docker_build "-openeuler"; then + docker_run "-openeuler" + else + let nr_openeuler_fail++ + fi +} + +docker_build() +{ + docker build -f "$file" -t "${image}$1" . + [ $? != 0 ] && { + [ "$flag" == "1" ] && echo "${image}$1.build.fail: 1" + return 1 + } + [ "$flag" == "1" ] && echo "${image}$1.build.success: 1" + flag=0 +} + +docker_run() +{ + docker run -d --name "${image}" "${image}$1" + wait + docker_stats=$(docker inspect -f '{{.State.Running}}' ${image}) + [ $docker_stats == false ] && { + echo "${image}.run.fail: 1" + return 1 + } + + echo "${image}.run.success: 1" +} + +docker_test() +{ + fit_repo + openeuler_ready + centos_docker +} + +docker_test -- 2.23.0
2 1
0 0
[PATCH lkp-tests 10/11] install-iso-pre: add step: submit install-iso-firstboot.yaml
by Yu Chuan 10 Mar '21

10 Mar '21
Signed-off-by: Yu Chuan <13186087857(a)163.com> --- tests/install-iso-pre | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/install-iso-pre b/tests/install-iso-pre index 45567feddd9c..17a821cf3c14 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -218,7 +218,32 @@ submit_install_iso_yaml() submit_install_iso_firstboot_yaml() { - : + log_info "start submit install-iso-firstboot.yaml" + + local firstboot_yaml="${LKP_SRC}/jobs/install-iso-firstboot.yaml" + [ -f "${firstboot_yaml}" ] || die "cannot find ${firstboot_yaml}" + + log_info " + ${LKP_SRC}/sbin/submit + ${firstboot_yaml} + suite=install-iso-firstboot-${ROOTFS_SUFFIX} + os=${iso_os} + os_arch=${iso_arch} + os_version=${iso_version} + os_mount=local + kernel_custom_params=\"use_root_partition=${ROOTFS_SUFFIX} save_root_partition=${ROOTFS_SUFFIX}\" + testbox=$testbox + " + + ${LKP_SRC}/sbin/submit \ + ${firstboot_yaml} \ + suite=install-iso-firstboot-${ROOTFS_SUFFIX} \ + os=${iso_os} \ + os_arch=${iso_arch} \ + os_version=${iso_version} \ + os_mount=local \ + kernel_custom_params="use_root_partition=${ROOTFS_SUFFIX} save_root_partition=${ROOTFS_SUFFIX}" \ + testbox=$testbox || die "submit ${firstboot_yaml} failed" } submit_install_iso_release_yaml() -- 2.23.0
2 4
0 0
[PATCH lkp-tests 09/11] install-iso-pre: add step: submit install-iso.yaml
by Yu Chuan 10 Mar '21

10 Mar '21
Signed-off-by: Yu Chuan <13186087857(a)163.com> --- tests/install-iso-pre | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tests/install-iso-pre b/tests/install-iso-pre index d867f1441003..45567feddd9c 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -182,9 +182,38 @@ prepare_submit() EOF } +prepare_install_iso_yaml() +{ + log_info "start prepare install-iso.yaml" + + custom_ipxe="#!ipxe\\\\n" + custom_ipxe="${custom_ipxe}\\\\ndhcp" + custom_ipxe="${custom_ipxe}\\\\ninitrd tftp://${TFTP_SERVER_HOST}/EFI/BOOT/${iso_os}/${iso_arch}/${iso_version}/initrd.img" + custom_ipxe="${custom_ipxe}\\\\nkernel tftp://${TFTP_SERVER_HOST}/EFI/BOOT/${iso_os}/${iso_arch}/${iso_version}/vmlinux ro inst.geoloc=0 console=ttyS0 smmu.bypassdev=0x1000:0x17 smmu.bypassde1000:0x15 viff video=VGA-1:640x480-32@60me initrd=initrd.img ip=dhcp inst.ks=http://${HTTP_SERVER_HOST}:${HTTP_SERVER_PORT}/os/kickstart/ks/${iso_os}_${iso_arch}_${iso_version}.cfg" + custom_ipxe="${custom_ipxe}\\\\nboot\\\\n" + + log_info "custom_ipxe: $custom_ipxe" + sed -i "/custom_ipxe:/ccustom_ipxe: \"${custom_ipxe}\"" ${install_iso_yaml} +} + submit_install_iso_yaml() { - : + log_info "start submit install-iso.yaml" + + local install_iso_yaml="${LKP_SRC}/jobs/install-iso.yaml" + [ -f "${install_iso_yaml}" ] || die "cannot find ${install_iso_yaml}" + + prepare_install_iso_yaml + + log_info " + ${LKP_SRC}/sbin/submit + ${install_iso_yaml} + testbox=$testbox + " + + ${LKP_SRC}/sbin/submit \ + ${install_iso_yaml} \ + testbox=$testbox || die "submit ${install_iso_yaml} failed" } submit_install_iso_firstboot_yaml() -- 2.23.0
2 2
0 0
[PATCH lkp-tests 07/11] install-iso-pre: add step: prepare_ks
by Yu Chuan 10 Mar '21

10 Mar '21
Signed-off-by: Yu Chuan <13186087857(a)163.com> --- tests/install-iso-pre | 72 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/tests/install-iso-pre b/tests/install-iso-pre index 85e2a5fd42ec..e27c9ea80232 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -86,9 +86,79 @@ prepare_lv() create_lv } +generate_ks() +{ + log_info "start generate $ks_file" + + local nic=$(ip route get ${LKP_SERVER} | awk '{print $3; exit}') + + cat > ${ks_file} <<-EOF + # Use network installation + url --url="http://${HTTP_SERVER_HOST}:${HTTP_SERVER_PORT}/${HTTP_ROOT_DIR}/${iso_os}/${iso_arch}/${iso_version}/" + + # Network information + network --bootproto=dhcp --device=${nic} --ipv6=auto --activate + network --hostname=localhost.localdomain + + # Specifies a list of disks for the installation program to use. All other disks are ignored. + ignoredisk --only-use=${rootfs_disk#/dev/} + + # if install to special lvm, bootloader should be none. + bootloader --location=none + logvol / --vgname=${VG_NAME} --name=${LV_NAME} --useexisting + + # Root password + rootpw --iscrypted ${ROOTFS_ROOT_PASSWD} + + # Reboot after installation + reboot --eject + + # Use text mode install + text + + # Keyboard layouts + keyboard --vckeymap=us --xlayouts='us' + + # System language + lang en_US.UTF-8 + + # Do not configure the X Window System + skipx + + # System services + services --enabled="chronyd" + + # System timezone + timezone Asia/Shanghai --isUtc + + %packages + @^minimal-environment + + %end + + %anaconda + pwpolicy root --minlen=8 --minquality=1 --notstrict --nochanges --notempty + pwpolicy user --minlen=8 --minquality=1 --notstrict --nochanges --emptyok + pwpolicy luks --minlen=8 --minquality=1 --notstrict --nochanges --notempty + %end + EOF +} + +upload_ks() +{ + log_info "start upload ks to rsync-server: ${RSYNC_SERVER_HOST}:${RSYNC_SERVER_PORT}" + + rsync -vrtopg --port ${RSYNC_SERVER_PORT} ${ks_file} ${RSYNC_SERVER_HOST}::ks/ || die "upload ks to rsync-server failed, please check." +} + prepare_ks() { - : + log_info "start prepare kickstart file" + + local ks_file=/tmp/${iso_os}_${iso_arch}_${iso_version}.ks + + generate_ks + upload_ks } prepare_submit() -- 2.23.0
2 2
0 0
[PATCH lkp-tests 06/11] install-iso-pre: add step: prepare_lv
by Yu Chuan 10 Mar '21

10 Mar '21
Signed-off-by: Yu Chuan <13186087857(a)163.com> --- distro/depends/install-iso-pre | 1 + tests/install-iso-pre | 43 +++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 distro/depends/install-iso-pre diff --git a/distro/depends/install-iso-pre b/distro/depends/install-iso-pre new file mode 100644 index 000000000000..6f88eb919896 --- /dev/null +++ b/distro/depends/install-iso-pre @@ -0,0 +1 @@ +lvm2 diff --git a/tests/install-iso-pre b/tests/install-iso-pre index 4e8cbe22fcd4..85e2a5fd42ec 100755 --- a/tests/install-iso-pre +++ b/tests/install-iso-pre @@ -40,9 +40,50 @@ check_params() done } +create_vg() +{ + log_info "start create vg:$VG_NAME" + + local disk + + for disk in "${rootfs_disk[@]}" + do + log_info "start handle disk: $disk" + pvdisplay ${disk} > /dev/null || pvcreate ${disk} || die "create pv failed: $disk" + + if vgdisplay ${VG_NAME} > /dev/null; then + vgextend ${VG_NAME} ${disk} + else + vgcreate ${VG_NAME} ${disk} + fi + done + +} + +create_lv() +{ + log_info "start create lv:$LV_NAME" + + lvcreate -y -L 10G -n ${LV_NAME} ${VG_NAME} || die "create logical volume failed." +} + prepare_lv() { - : + log_info "start prepare logical volume" + + # VG_NAME defines in job.yaml + export VG_NAME + export LV_NAME="${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX}" + + # lv existed + lvdisplay /dev/mapper/${VG_NAME}-${LV_NAME} > /dev/null && { + log_info "iso already install to this testbox, so rootfs maybe already generated ok. please check it." + exit 0 + } + + # lv not existed + vgdisplay ${VG_NAME} > /dev/null || create_vg + create_lv } prepare_ks() -- 2.23.0
2 2
0 0
[PATCH lkp-tests 04/11] install-iso-release: add step: release_rootfs
by Yu Chuan 10 Mar '21

10 Mar '21
Signed-off-by: Yu Chuan <13186087857(a)163.com> --- distro/depends/install-iso-release | 2 ++ tests/install-iso-release | 53 +++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 distro/depends/install-iso-release diff --git a/distro/depends/install-iso-release b/distro/depends/install-iso-release new file mode 100644 index 000000000000..2abb6b833291 --- /dev/null +++ b/distro/depends/install-iso-release @@ -0,0 +1,2 @@ +nfs-common +lvm2 diff --git a/tests/install-iso-release b/tests/install-iso-release index 23e8fbff8e4f..8c925ee2bcd8 100755 --- a/tests/install-iso-release +++ b/tests/install-iso-release @@ -7,6 +7,20 @@ set -e . $LKP_SRC/lib/debug.sh . $LKP_SRC/lib/log.sh +SKIP_RELEASE_DIRS=( + "srv" + "opt" + "mnt" + "media" + "home" + "lost+found" + "dev" + "proc" + "run" + "sys" + "var/log" +) + check_params() { log_info "start check params" @@ -29,9 +43,46 @@ check_params() done } +prepare_exclude_file() +{ + local exclude_file=$1 + + rm -rf $exclude_file + for i in "${SKIP_RELEASE_DIRS[@]}" + do + echo $i >> $exclude_file + done +} + release_rootfs() { - : + # mount nfs rootfs + local nfs_rootfs_mount_point=/tmp/nfs_rootfs_${ROOTFS_SUFFIX} + + mkdir -p ${nfs_rootfs_mount_point} + mount -t nfs ${NFS_SERVER_HOST}:${NFS_ROOT_DIR}/${os}/${os_arch}/${os_version}-iso-${ROOTFS_SUFFIX} ${nfs_rootfs_mount_point} || die "mount nfs rootfs failed" + + # activate the lvm + vgchange -ay + + # mount local logical volume + local lv_rootfs_mount_point=/tmp/lv_rootfs_${ROOTFS_SUFFIX} + + mkdir -p ${lv_rootfs_mount_point} + mount /dev/mapper/${VG_NAME}-${iso_os}_${iso_arch}_${iso_version}_${ROOTFS_SUFFIX} ${lv_rootfs_mount_point} || die "mount lv rootfs failed" + + # release rootfs + local exclude_file=/tmp/exclude_file_${ROOTFS_SUFFIX} + + prepare_exclude_file "$exclude_file" + rsync -az ${lv_rootfs_mount_point}/. ${nfs_rootfs_mount_point} --exclude-from=$exclude_file || die "copy out rootfs failed" + cd ${nfs_rootfs_mount_point} && mkdir -p "${SKIP_RELEASE_DIRS[@]}" + + # umount nfs rootfs + umount $nfs_rootfs_mount_point || log_warn "umount failed: nfs_rootfs_mount_point" + + # umount local logical volume + umount $lv_rootfs_mount_point || log_warn "umount failed: $lv_rootfs_mount_point" } main() -- 2.23.0
2 2
0 0
  • ← Newer
  • 1
  • ...
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • ...
  • 523
  • Older →

HyperKitty Powered by HyperKitty